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