#define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #include #include //#include using namespace std; bool f[10008]; bool F[10008]; int main() { vectorp; p.push_back(2); for(int i=3;i<10001;i+=2){ f[i]=1; for(int j=3;j*j<=i;j++){ if(i%j==0){ f[i]=0; break; } } if(f[i])p.push_back(i); } f[2]=1; int n; cin>>n; for(int i=0;i<=n;i++) F[i]=1; for(int i=3;i<=n;i++){ int r=0; while(p.size()>r){ if(p[r]>=i)break; if(i-p[r]<=1)break; if(F[i-p[r]]==1){ F[i]=0;break; } r++; } //cout<