N=eval(input())

print(int(N**0.5)**2)
print(int(input()**0.5)**2)
N = eval(input())
print(int(N**0.5) ** 2)

print(int(input() ** 0.5) ** 2)

-N = eval(input()) -print(int(N**0.5) ** 2) +print(int(input() ** 0.5) ** 2)