A, B = map(int, input().split()) C, D = map(int, input().split()) E = A*A+B*C F = A*B+B*D G = A*C+C*D H = B*C+D*D print(A*E+B*G, A*F+B*H) print(C*E+D*G, C*F+D*H)