#include using namespace std; int main() { int N; cin >> N; vectorprime(1000001,true); for(int i = 2; i <= 1000000; i++) { if(prime[i]) { for(int j = 2*i; j <= 1000000; j += i) { prime[j] = false; } } } long long tmp = 1; constexpr int mod = 998244353; for(int i = 2; i < N; i++) { if(!prime[i]) { continue; } long long mx = 0; for(int j = i; j < N; j += i) { int x = j; long long y = 1; while (x%i == 0) { x /= i; y *= i; } x = N-j; while (x%i == 0) { x /= i; y *= i; } mx = max(mx,y); } tmp *= mx; tmp %= mod; } cout << tmp << endl; }