#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; #define loop(i,a,b) for(int i=a;ib;i--) const int inf=1e8; const ll INF=1e16; #define MOD 1000000007 #define mod 1000000009 int main(){ int n; cin>>n; vector sosuu; sosuu.push_back(2); loop(i,3,10001){ int flag=0; loop(j,2,i){ if(i%j==0){ flag=1; } } if(flag==0){ sosuu.push_back(i); } } vector kekka(2,1); loop(i,0,2){ kekka.push_back(-1); } loop(i,4,n+1){ int j=0; int flag=-1; while(sosuu[j]