S = int(input()) s = S ans = [] while s > 0: p = int(s**0.5) s -= p**2 ans.append(p**2) print(len(ans)) print(*ans, sep=' ')