import sys input = lambda :sys.stdin.readline()[:-1] ni = lambda :int(input()) na = lambda :list(map(int,input().split())) yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES") no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO") ####################################################################### m = [na() for i in range(2)] def mul(a, b): return (a[0][0]*b[0][0] + a[0][1] * b[1][0],a[0][0]*b[0][1]+a[0][1]*b[1][1]), (a[1][0]*b[0][0]+a[1][1]*b[1][0],a[1][0]*b[0][1]+a[1][1]*b[1][1]) m = mul(mul(m, m),m) for a, b in m: print(a,b)