from sys import stdin input=lambda :stdin.readline()[:-1] S=int(input()) def floor_sqrt(n): if n<0: return -1 ng,ok=n+1,-1 while ng-ok>1: mid=(ok+ng)//2 if mid*mid<=n: ok=mid else: ng=mid return ok ans=[] while S>0: x=floor_sqrt(S) ans.append(x*x) S-=x*x print(len(ans)) print(*ans)