M = int(input()) prime = [] C = 5000 dat = [0] * C for i in range(2,C): if dat[i] == 0: prime.append(i) for j in range(i,C,i): dat[j] = 1 l = [] for i in range(30): mask = 1 << i if mask & M: l.append(i) ans = [] n = len(l) for i in range(n-1,-1,-1): p = prime[i] now = 1 for _ in range(l[i]): now *= p ans.append(now) for j in range(n): ans.append(prime[n + j]) print(len(ans)) print(*ans)