result=[] x=int(input()) while x>0: l=1 r=10**9 while True: m=(l+r+1)//2 if m**2<=x: l=m else: r=m-1 if l==r: break result.append(l**2) x-=l**2 print(len(result)) print(*result)