#include<bits/stdc++.h>
using namespace std;
int main()
{
//printf("%.2lf",-0.004);
double a1,b1,a2,b2;
scanf("%lf%lf%lf%lf",&a1,&b1,&a2,&b2);
double A,B,C;double c=0.005;
C=b1+b2;
A=a1*a2*cos(C);
B=a1*a2*sin(C);
if(A<0&&((A+0.005)>0))//由题意 当大于-0.005且小于0时 应为+0.00 但使用%.2输出会添上-负号
{
A=0.00;
}
printf("%.2lf",A);
if(B<0&&B+0.005>0)
{
printf("+0.00i");
}
else if(B<0)
{
printf("%.2lfi",B);
}
else printf("+%.2lfi",B);
return 0;
}