import sys def main(): input = lambda: sys.stdin.readline()[:-1] S = int(input()) ans, n = [], S while n: x = int(n**0.5) ** 2 ans.append(x) n -= x print(len(ans)) print(*ans) if not __debug__: f = open(sys.argv[1], "r") sys.stdin = f main()