from math import isqrt S = int(input()) ans = [] while 1 <= S: routeS = isqrt(S) ans.append(routeS**2) S -= ans[-1] print(len(ans)) print(*ans)