class cplx{
    double re, im;
public:
    cplx(double _re=0, double _im=0):re(_re), im(_im){}
    cplx& operator+=(cplx b)
    {
        re += b.re;
        im += b.im;
        return *this;
    }
};

cplx& operator+(cplx a, cplx b)
{
    return cplx(a)+=b;
}
