import numpy def main(): M = [list(map(int, input().split())) for _ in range(2)] M = numpy.array(M) M = M * M * M print(M[0, 0], M[0, 1]) print(M[1, 0], M[1, 1]) main()