import sys import numpy a, b = map(int, input().split()) c, d = map(int, input().split()) M = numpy.matrix([[a, b], [c, d]]) np.savetxt(sys.stdout, M * M * M, fmt='%i')