from math import sqrt S=int(input()) ans=[] rest=S for i in range(15): m=int(rest**0.5) rest-=int(rest**0.5)**2 ans.append(m**2) if rest==0: break print(len(ans)) print(*ans,sep=" ")