def floor_sqrt(n): ub = 2 * 10 ** 9 lb = -1 while ub - lb > 1: t = (ub + lb) // 2 if t * t <= n: lb = t else: ub = t return lb s = int(input()) ans = [] while s > 0: v = floor_sqrt(s) s -= v * v ans.append(v * v) print(len(ans)) print(*ans)