N = int(eval(input()))

print((int(pow(N,0.5)//1)**2))
N = int(eval(input()))

print((int(N**0.5)**2))
N = int(eval(input()))
print((int(pow(N, 0.5) // 1) ** 2))

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

-print((int(pow(N, 0.5) // 1) ** 2)) +print((int(N**0.5) ** 2))