from math import sqrt, ceil def isqrt(n): yes = 0 no = 10 ** 18 while no - yes != 1: mid = (yes + no)//2 if mid * mid <= n: yes = mid else: no = mid return yes ** 2 S = int(input()) ans = [] while S: yes = isqrt(S) S -= yes ans.append(yes) print(len(ans)) print(*ans)