import sys input = sys.stdin.readline from math import sqrt S=int(input()) ANS=[] while S>0: x=int(sqrt(S)) ANS.append(x) S-=x*x print(len(ANS)) print(*ANS)