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