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