import math n=int(input()) l=[] while n>0: x=math.isqrt(n)**2 l.append(x) n=n-x print(len(l)) print(*l)