r = int(eval(input()))

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

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

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

-print((3 * r**2)) +print((3 * r * r))