#include using namespace std; #define all(v) (v).begin(),(v).end() #define pb(a) push_back(a) #define rep(i, n) for(int i=0;i 0) { if (n & 1) res = res * a % MOD; a = a * a % MOD; n >>= 1; } return res; } struct UnionFind { vector par; UnionFind(int n) :par(n, -1) { } void init(int n) { par.assign(n, -1); } int root(int x) { if (par[x] < 0) return x; else return par[x] = root(par[x]); } bool connect(int x, int y) { x = root(x); y = root(y); if (x == y) return false; if (par[x] > par[y]) swap(x, y); par[x] += par[y]; par[y] = x; return true; } int size(int x) { return -par[root(x)]; } }; vector> prime(ll n) { ll m = n; vector> v; for(ll i = 2; i * i <= n; i ++) { ll num = 0; while(m % i == 0) { num ++; m /= i; } if(num) v.push_back({i, num}); } if(m > 1) v.push_back({m, 1}); return v; } int main() { cin.tie(0); ios::sync_with_stdio(false); ll n, p, q; cin >> n >> p >> q; if(p == 1) { if(q == 1) { cout << 1 << endl; } else { cout << 2 << endl; } return 0; } else if(q == 1) { cout << 2 << endl; return 0; } vector ord(n); iota(all(ord), 0); reverse(ord.begin(), ord.begin() + p); reverse(ord.begin() + n - q, ord.end()); UnionFind uf(n); rep(i, n) uf.connect(i, ord[i]); set st; rep(i, n) st.insert(uf.root(i)); map mp; foa(e, st) { for(auto [x, y] : prime(uf.size(e))) { mp[x] = max(mp[x], y); } } ll ans = 2; for(auto [x, y] : mp) { ans *= modpow(x, y, MOD998); ans %= MOD998; } cout << ans << endl; return 0; }