#include using namespace std; using ll = long long; ll m = 998244353; ll mpow(ll a, ll n) { ll ret = 1; while (n) { if (n & 1) { ret *= a; ret %= m; } n >>= 1; a = (a * a) % m; } return ret; } int main () { int N, p, q; cin >> N >> p >> q; int A[100010]; for (int i = 0; i < N; i ++) { A[i] = i; } reverse(A, A + p); reverse(A+(N-q), A+N); vector did(N, 0); vector ans(N + 1, 0); vector lpr(N + 1, 0); lpr[0] = lpr[1] = 1; for (int i = 2; i <= N; i ++) { if (!lpr[i]) { lpr[i] = i; for (int j = 2; j * i <= N; j ++) { lpr[i * j] = i; } } } for (int i = 0; i < N; i ++) { if (did[i]) { continue; } int cnt = 0; int fl = i; do { cnt ++; fl = A[fl]; did[fl] = 1; } while (fl != i); while (cnt > 1) { int c = 0; int p = lpr[cnt]; while (cnt % p == 0) { c ++; cnt /= p; } ans[p] = max(ans[p], c); } } ll r = 1; for (int i = 2; i <= N; i ++) { r *= mpow(i, ans[i]); r %= m; } cout << (r * (max(p, q) == N ? 1 : 2)) % m << endl; }