#include using namespace std; using ll = long long; using P = pair; #define fix(x) fixed << setprecision(x) #define asc(x) x, vector, greater #define rep(i, n) for(ll i = 0; i < n; i++) #define all(x) (x).begin(),(x).end() templatebool chmin(T&a, const T&b){if(a>b){a=b;return 1;}return 0;} templatebool chmax(T&a, const T&b){if(a> m; if(m==0){ cout << "1\n1\n"; return 0; } vector b(100001,true); vector ans, pn; for(int i=2;i<=100000;i++){ if(b[i]){ pn.push_back(i); for(int j=2;i*j<=100000;j++) b[i*j] = false; } } int cnt = 30, now = 0, n = pn.size()-1, x = n; while(cnt>=0){ if(m&(1<100000) x--; rep(i,cnt) ans.push_back(pn[now]*pn[x--]); } now++; cnt--; } sort(all(ans)); cout << ans.size() << '\n'; for(int x:ans) cout << x << ' '; cout << '\n'; return 0; }