from decimal import Decimal import math import bisect def binary_search(num): l = 1 r = 10**9+1 mid = (l+r)//2 while r-l > 1: mid = (l+r)//2 if mid*mid <= num: l = mid else: r = mid return l s = int(input()) ans = list() while True: if s == 0: break num = binary_search(s) ans.append(num*num) s -= num*num print(len(ans)) print(*ans)