class Complex{
int a;
int b;
Complex(int a,int b){
this.a = a;
this.b = b;
}
Complex(){
this.a=0;
this.b=0;
}
Complex add(Complex c){
Complex r = new Complex();
r.a = this.a + c.a;
r.b = this.b + c.b;
return r;
}
Complex sub(Complex d){
Complex t=new Complex();
t.a=this.a-d.a;
t.b=this.b-d.b;
return d;
}
}
public class TestComplex {
public static void main(String[] args) {
// TODO Auto-generated method stub
Complex c1 = new Complex(40,30);
Complex c2 = new Complex(30,20);
System.out.println(c1.add(c2));
}
}