import math N = int(input()) ans = [] while N > 0 : a = math.isqrt(N) ans.append(a) N -= (a * a) print(len(ans)) print(*ans)