n = int(eval(input()))

a = int(eval(input()))



y = n * n

x = y - a



print(x)
n = int(eval(input()))

a = int(eval(input()))



print((n * n - a))
n = int(eval(input()))
a = int(eval(input()))
y = n * n
x = y - a
print(x)

n = int(eval(input()))
a = int(eval(input()))
print((n * n - a))

-y = n * n -x = y - a -print(x) +print((n * n - a))