#include #define pt(sth) cout << sth << "\n" #define itr(x,c) for(auto x=c.begin();x!=c.end();x++) #define ritr(x,c) for(auto x=c.rbegin();x!=c.rend();x++) #define all(a) (a.begin()),(a.end()) #define rall(a) (a.rbegin()),(a.rend()) #define __builtin_popcount(v) popcount(v) using namespace std; #include using namespace atcoder; typedef long long ll; typedef pair pll; templatebool chmax(T &a, const T &b) {if(abool chmin(T &a, const T &b) {if(b>a[i]; typedef vector v1d; typedef vector v2d; typedef vector v3d; typedef vector v4d; template struct PrimeFact { vector spf; PrimeFact(T N) { init(N); } void init(T N) { // 前処理。spf を求める spf.assign(N + 1, 0); for (T i = 0; i <= N; i++) spf[i] = i; for (T i = 2; i * i <= N; i++) { if (spf[i] != i) continue; for (T j = i + i; j <= N; j += i) { spf[j] = i; } } } map get(T n) { // nの素因数分解を求める map m; while (n != 1) { m[spf[n]]++; n /= spf[n]; } return m; } }; int main(void) { ll i,j,k,l; ll N;cin>>N; PrimeFact pf(N); map cnt; for(i=1;i<=N;i++){ map pri=pf.get(i); itr(it,pri){ chmax(cnt[it->first],it->second); } } modint998244353 ans=1; itr(it,cnt){ ans*=modint998244353(it->first).pow(it->second); } ans/=prev(cnt.end())->first; pt(ans.val()); }