s = int(input()) ans = [] while s: t = int(s ** 0.5) s -= t * t ans.append(t * t) print(len(ans)) print(*ans)