import sys
input = sys.stdin.readline
from math import sqrt

S=int(input())

ANS=[]
while S>0:
    x=int(sqrt(S))
    while x*x>S:
        x-=1
    ANS.append(x*x)
    S-=x*x

print(len(ANS))
print(*ANS)