S = int(input()) ans = [] while S > 0: l = 1 r = int(S**0.5) + 5 while r - l > 1: m = (r + l) // 2 if m**2 > S: r = m else: l = m a = l**2 ans.append(a) S -= a print(len(ans)) print(*ans)