s=int(input()) a=[] while s>0: a+=[int(s**0.5)**2] s-=int(s**0.5)**2 print(len(a)) print(*a)