#include <iostream>
using namespace std;
class complex
{
private:
double image;
double real;
public:
complex(double r = 0, double i = 0)
{ real = r; image = i; }
complex operator+(complex &c2);
complex operator-(complex &c2);
complex operator*(complex &c2);
void show();
};
complex complex::operator+(complex &c2)
{
complex c;
c.real = real + c2.real;
c.image = image + c2.image;
return c;
}
complex complex::operator-(complex &c2)
{
complex c;
c.real = real - c2.real;
c.image = image - c2.image;
return c;
}
complex complex::operator*(complex &c2)
{
complex c;
c.real = real * c2.real - image * c2.image;
c.image = image * c2.image + real * c2.image;
return c;
}
void complex::show()
{
cout << "(" << real << "," << image << "i)" << endl;
}
int main()
{
double a, b, c, d;
cin >> a >> b >> c >> d;
complex c1(a, b), c2(c, d), c3;
c3 = c1 + c2;
cout << "c1+c2=";
c3.show();
c3 = c1 - c2;
cout << "c1-c2=";
c3.show();
c3 = c1 * c2;
cout << "c1*c2=";
c3.show();
return 0;
}