a,b=map(int,input().split()) c,d=map(int,input().split()) A,B,C,D=1,0,0,1 for _ in range(3): A,B,C,D=A*a+B*c,A*b+B*d,C*a+D*c,C*b+D*d print(A,B) print(C,D)