import math S=int(input()) ans=[] while S: t=int(math.sqrt(S)) t*=t ans.append(t) S-=t print(len(ans)) print(*ans)