while True: try: list2=[] list3=[] for i in range(2): list1=list(map(int,input().strip().split())) list2.append(list1) for i in range(3): list1=list(map(int,input().strip().split())) list3.append(list1) list4=[[0,0],[0,0]] for i in range(2): for j in range(2): for k in range(3): list4[i][j]+=list2[i][k]*list3[k][j] for i in range(2): for j in range(2): print(list4[i][j],end=' ') print() except EOFError: break