import sys, time, random from collections import deque, Counter, defaultdict input = lambda: sys.stdin.readline().rstrip() ii = lambda: int(input()) mi = lambda: map(int, input().split()) li = lambda: list(mi()) inf = 2 ** 63 - 1 mod = 998244353 from math import isqrt n = ii() N = n ans = [] while n > 0: ans.append(isqrt(n) ** 2) n -= ans[-1] assert sum(ans) == N print(len(ans)) print(*ans)