#include <cstdio>
#include <iostream>
using namespace std;
struct num{
double a;
double b;
};
void add(struct num A, struct num B, struct num* C);
void sub(struct num A, struct num B, struct num* C);
void mul(struct num A, struct num B, struct num* C);
void div(struct num A, struct num B, struct num* C);
void clac(char op, struct num A, struct num B, struct num* C);
void clac(char op, struct num A, struct num B, struct num* C){
switch(op){
case '+': add(A,B,C); break;
case '-': sub(A,B,C); break;
case '*': mul(A,B,C); break;
case '/': div(A,B,C); break;
}
}
void add(struct num A, struct num B, struct num* C){
C->a = A.a + B.a;
C->b = A.b + B.b;
}
void sub(struct num A, struct num B, struct num* C){
C->a = A.a - B.a;
C->b = A.b - B.b;
}
void mul(struct num A, struct num B, struct num* C){
C->a = A.a*B.a - A.b*B.b;
C->b = A.a*B.b + A.b*B.a;
}
void div(struct num A, struct num B, struct num* C){
double x = B.a*B.a + B.b*B.b;
C->a = (A.a*B.a + A.b*B.b)/x;
C->b = (A.b*B.a - A.a*B.b)/x;
}
int main(){
struct num A;
struct num B;
struct num C;
char op;
cin >> op >> A.a >> A.b >> B.a >> B.b;
clac(op, A,B,&C);
printf("%.2f+%.2fi
", C.a, C.b);
return 0;
}