import math S = int(input()) ANS = [] while S>0: ANS.append(math.isqrt(S)**2) S-=ANS[-1] print(len(ANS)) print(*ANS)