import math
s = int(input())
ans = list()
while True:
    if s == 0:
        break
    num = int(math.sqrt(s))
    ans.append(num*num)
    s -= num*num
print(len(ans))
print(*ans)