#include using namespace std; using ll =long long; #define all(v) v.begin(),v.end() #define rep(i,a,b) for(int i=a;i=b;i--) ll INF=2e18; int main() { ios::sync_with_stdio(false); cin.tie(0); ll N;cin>>N; if(N==1) { cout<<"! "<<1<<" "<<1< note(N+1); for(ll i=2;i<=N;i++) { if(note[i]) continue; for(ll j=2;j*i<=N;j++) note[j*i]=true; } vector A(N),B(N); vector C(N); for(ll i=0;i>X; C[i]=X; } ll mi=INF; for(ll i=0;i D(N); for(ll i=1;i>X; D[i]=X; } for(ll i=1;i vec(0); for(ll i=0;i>X; if(X%ma==0) { A[vec[0]]=ma; A[vec[1]]=1; } else { A[vec[0]]=1; A[vec[1]]=ma; } ll one; for(ll i=0;i>X; B[i]=X; } cout<<"! "; for(auto x:A) cout<