n=int(input()) X=[] while n!=0: a=int(n**(1/2)//1) X.append(a**2) n-=a**2 print(len(X)) print(*X)