#include #define rep(i,n) for(int i = 0; i < (n); i++) using namespace std; typedef long long ll; vector smallest_prime_factors(int N){ vector spf(N + 1); iota(spf.begin(), spf.end(), 0); for(int i = 2; i * i <= N; i++){ if(spf[i] != i) continue; for(int j = i * i; j <= N; j += i){ if(spf[j] == j) spf[j] = i; } } return spf; } vector prime_facrorize_query(int x, vector &spf){ vector res; while(x != 1){ res.emplace_back(spf[x]); x /= spf[x]; } sort(res.begin(), res.end()); return res; } ll mod = 998244353; ll modpow(ll a,ll b){ ll ans = 1; a %= mod; while(b){ if(b&1) ans = ans * a % mod; a = a * a % mod; b >>= 1; } return ans; } int main(){ cin.tie(0); ios::sync_with_stdio(0); int N; cin >> N; int MX = 1000000; auto spf = smallest_prime_factors(MX); map cnt; for(int i = 1; i <= N - 1; i++){ auto a = prime_facrorize_query(i, spf); auto b = prime_facrorize_query(N - i, spf); map mp; for(int j : a) mp[j]++; for(int j : b) mp[j]++; for(auto e : mp) cnt[e.first] = max(cnt[e.first], e.second); } ll ans = 1; for(auto e : cnt) ans = (ans * modpow(e.first, e.second)) % mod; cout << ans << endl; }