class primes(): def __init__(self, n): self.prime_num = n self.min_prime = [-1] * (self.prime_num + 1) # 2以上の自然数に対して最小の素因数を表す self.min_prime[0] = 0 self.min_prime[1] = 1 i = 2 self.prime = [] self.memo_prifac = {} while i <= self.prime_num: if self.min_prime[i] == -1: self.min_prime[i] = i self.prime.append(i) for j in self.prime: if i * j > self.prime_num or j > self.min_prime[i]: break self.min_prime[j * i] = j i += 1 def prifac(self, n): # 素因数分解した結果を返す if n in self.memo_prifac: return self.memo_prifac[n] res = {} x = n while x > 1: p = self.min_prime[x] if p in res: res[p] += 1 else: res[p] = 1 x //= p # self.memo_prifac[n] = res #場合によってはこの行を消すと高速化 return res def divisors(self, n): # 約数列挙 メモした方がいいかも if n== 1: return [1] prf = self.prifac(n) keys = [key for key in prf] def divsearch(i): if i == len(keys) - 1: return [keys[i] ** j for j in range(prf[keys[i]] + 1)] else: res = [] subres = divsearch(i + 1) p = keys[i] for j in range(prf[p] + 1): for node in subres: res.append(node * p ** j) return res return divsearch(0) prime=primes(2*10**5).prime m=int(input()) if m==0: print(1) print(1) exit() while prime[-1]>10**5:prime.pop() ind=0 ind2=-1 cost=10**9 res=[] for b in range(31): x=[] c=0 nokori=m if nokori-(2**b-1)>=0: x.append((b,0)) nokori-=2**b-1 c+=b for i in range(29,-1,-1): if nokori-2**i>=0: x.append((i,1)) nokori-=2**i c+=i if c1: ans[i]*=prime[ind] ind+=1 print(len(ans)) print(ans)