import sys input = sys.stdin.readline S = int(input()) ans = [] now = S while now!=0: tmp = int(now**(0.5)) ans.append(tmp**2) now -= tmp**2 print(len(ans)) print(*ans)