#include using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair P; #define fi first #define se second #define repl(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++) #define rep(i,n) repl(i,0,n) #define all(x) (x).begin(),(x).end() #define dbg(x) cout<<#x"="<y?x:y) #define mmin(x,y) (x ps,sps; int mask[2000]; vector vs[2000]; int dp[2][1<<12]; int main(){ cin>>n; repl(i,2,n+1){ bool ok=true; repl(j,2,i){ if(i%j==0)ok=false; } if(ok)ps.push_back(i); } rep(i,ps.size()){ if(ps[i]*ps[i]<=n)sps.push_back(ps[i]); } int m=sps.size(); repl(i,2,n+1){ rep(j,m){ if(i%sps[j]==0)mask[i]|=(1<