#include using namespace std; //#include //using namespace atcoder; using ll=long long; #define MAX 1000 #define MOD 998244353 vector p; vector p_table(MAX+1,true); void prime(){ p_table.at(0)=false,p_table.at(1)=false; for(int i=2;i<=MAX;i++){ if(p_table.at(i)){ p.push_back(i); for(int j=2;i*j<=MAX;j++){ p_table.at(i*j)=false; } } } } int main(){ int N; cin>>N; prime(); int n=p.size(); vector cnt(n,0); vector other_p(N,0); for(int i=1;i<=N/2;i++){ int x=i; int y=N-i; for(int j=0;j1&&y>1){ if(x==y){ other_p[x]=2; }else{ other_p[x]=max(1,other_p[x]); other_p[y]=max(1,other_p[y]); } }else if(x>1){ other_p[x]=max(1,other_p[x]); }else if(y>1){ other_p[y]=max(1,other_p[y]); } } ll ans=1; for(int i=0;i