k=int(eval(input()))



print((3*k*k))
print((3*int(eval(input()))**2))
k = int(eval(input()))
print((3 * k * k))

print((3 * int(eval(input())) ** 2))

-k = int(eval(input())) -print((3 * k * k)) +print((3 * int(eval(input())) ** 2))