N=int(eval(input()))

while N:

    if N**0.5%1==0:print(N);break

    N-=1
N = int(eval(input()))

while N**0.5 % 1:

    N -= 1

print(N)
N = int(eval(input()))
while N:
    if N**0.5 % 1 == 0:
        print(N)
        break
    N -= 1

N = int(eval(input()))
while N**0.5 % 1:
    N -= 1
print(N)

-while N: -    if N**0.5 % 1 == 0: -        print(N) -        break +while N**0.5 % 1: +print(N)