#include <cstdio>
#include <cmath>
int main() {
double a,b,c,d;
scanf("%lf %lf %lf %lf",&a,&b,&c,&d);
double a1,a2;
a1=a*c*cos(b+d);//三角复合函数
a2=a*c*sin(b+d);//三角复合函数
if (fabs(a1)<=0.01)
a1=0.00;
if (fabs(a2)<=0.01)
a2=0.00;
if (a2<0)
printf("%.2lf-%.2lfi",a1,-a2);
else
printf("%.2lf+%.2lfi",a1,a2);
return 0;
}