n = int(eval(input()))

print((int(int(n**.5)**2)))
n = int(eval(input()))

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

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

-print((int(int(n**0.5) ** 2))) +print((int(n**0.5) ** 2))