import math n = int(input()) ans = [] while n > 0: x = math.isqrt(n) ans.append(x*x) n -= (x * x) print(len(ans)) print(*ans)