S = int(input()) ans = [] while S: OK = 1 NG = 10**10 while NG - OK >= 2: MID = (OK+NG)//2 if MID*MID <= S: OK = MID else: NG = MID ans.append(OK*OK) S -= OK*OK print(len(ans)) print(*ans)