import math S = int(input()) ans = [] while S > 0: t = math.floor(S**0.5) if t**2 > S: t -= 1 a = t ** 2 ans.append(a) S -= a print(len(ans)) print(*ans)