from math import isqrt s = int(input()) ans = [] while s: x = isqrt(s) ** 2 ans.append(x) s -= x print(len(ans)) print(*ans)