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