S=int(input()) rest=S for i in range(15): l,r=0,10**10 while r-l>1: m=(l+r)//2 if m**2>rest: r=m else: l=m rest-=l**2 if l==0: break print(l**2,end=" ") print()