from decimal import Decimal s = int(input()) ans = list() while True: if s == 0: break num = int(Decimal(s**(1/2))) ans.append(num*num) s -= num*num print(len(ans)) print(*ans)