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