a = int(eval(input()))

print((a**3))
x = int(eval(input()))

print((x**3))



a = int(eval(input()))
print((a**3))

x = int(eval(input()))
print((x**3))

-a = int(eval(input())) -print((a**3)) +x = int(eval(input())) +print((x**3))