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