def solve(a,b,c,d): return a*a+b*c,a*b+b*d,c*a+d*c,c*b+d*d a,b=map(int,input().split()) c,d=map(int,input().split()) e,f,g,h=solve(a,b,c,d) print(a*e+b*g,a*f+b*h) print(c*e+d*g,c*f+d*h)