#include using namespace std; #if __has_include() #include using namespace atcoder; #endif #define GET_MACRO(_1, _2, _3, NAME, ...) NAME #define _rep(i, n) _rep2(i, 0, n) #define _rep2(i, a, b) for(int i = (int)(a); i < (int)(b); i++) #define rep(...) GET_MACRO(__VA_ARGS__, _rep2, _rep)(__VA_ARGS__) #define all(x) (x).begin(), (x).end() #define i64 long long template bool chmin(T& a, const T& b) { return (b < a) ? (a = b, true) : false; } template bool chmax(T& a, const T& b) { return (b > a) ? (a = b, true) : false; } using mint = modint998244353; vector erat(long long n) { vector res(n + 1, true); res[0] = false; res[1] = false; for(long long i = 2; i <= n; i++) { if(res[i]) { if(i * i <= n) { for(long long j = i * i; j <= n; j += i) { res[j] = false; } } } } return res; } int main() { int n; cin >> n; auto f = erat(n); mint ans = 1; int k = 1; for (int i = 1; i <= n; i++) { if(f[i]) { auto u = n; auto x = n / i; if(x == 1) k = i; while(u > i) { ans *= i; u /= i; } } } ans /= k; cout << ans.val() << endl; }