n=int(input()) a=[] for i in range(15): b=int(n**0.5) bb=b**2 n-=bb a.append(bb) if n==0: break print(len(a)) print(*a)