struct cpx
{
double r,v;
cpx(double _r,double _v):r(_r),v(_v){}
cpx():r(0),v(0){}
friend cpx operator+(cpx A,cpx B){cpx C(A.r+B.r,A.v+B.v);return C;}
friend cpx operator-(cpx A,cpx B){cpx C(A.r-B.r,A.v-B.v);return C;}
friend cpx operator*(cpx A,cpx B){cpx C(A.r*B.r-A.v*B.v,A.v*B.r+A.r*B.v);return C;}
}