import math S = int(input()) A = [] while S > 0: i = 0 while True: k = int(math.floor(pow(S, 0.5))) - i if S - pow(k, 2) >= 0: break else: i += 1 S -= pow(k,2) A.append(pow(k,2)) # print(A,S,k,k**2) print(len(A)) print(*A)