n = int(eval(input()))

for i in range(n,0,-1):

    if i**0.5 == int(i**0.5):

        ans = i

        break

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

print((int(n**0.5)**2))
n = int(eval(input()))
for i in range(n, 0, -1):
    if i**0.5 == int(i**0.5):
        ans = i
        break
print(ans)

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

-for i in range(n, 0, -1): -    if i**0.5 == int(i**0.5): -        ans = i -        break -print(ans) +print((int(n**0.5) ** 2))