#include <iostream>
using namespace std;
class Complex {
public:
double re, im;
Complex() {} // コンストラクタ
Complex(double re1, double im1 = 0.0) { // コンストラクタ
re = re1;
im = im1;
}
Complex add(Complex v) {
Complex x;
x.re = re + v.re;
x.im = im + v.im;
return x;
}
};
int main()
{
Complex x(1, 2), y(3);
Complex z = x.add(y);
cout << "(" << z.re << ", " << z.im << ")\n";
return 0;
}