def binary_search(num): l = 0 r = num mid = (l+r)//2 if num == 1: return 1 while r-l > 0: mid = (l+r)//2 #print(l,r,mid) if mid*mid < num: return mid else: r = mid 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)