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