import math S = int(input()) ans = [] while S: x = math.isqrt(S) x = x**2 ans.append(x) S -= x assert len(ans) <= 15 print(len(ans)) print(*ans)