#include using namespace std; using LL=long long; using ULL=unsigned long long; #define rep(i,n) for(int i=0; i<(n); i++) int N; bool sieve[1000001]={}; int p=1; const ULL M=998244353; int main(){ cin>>N; sieve[0]=sieve[1]=true; for(int i=2; i<=1000000; i++) if(!sieve[i]){ if(i<=1000) for(int j=i*i; j<=1000000; j+=i) sieve[j]=true; if(i<=N) p=i; } ULL ans=1; rep(i,N+1) if(!sieve[i]) if(p!=i) { for(ULL j=i; j<=N; j*=i) ans=ans*i%M; } cout<