#include const int Mod = 998244353; int main() { int N, p, q; scanf("%d %d %d", &N, &p, &q); if (p == 1 || q == 1) { if (p == 1 && q == 1) printf("1\n"); else printf("2\n"); fflush(stdout); return 0; } int i, j, A[100001]; for (i = 1; i <= N; i++) A[i] = i; for (i = 1, j = p; i < j; i++, j--) { A[i] ^= A[j]; A[j] ^= A[i]; A[i] ^= A[j]; } for (i = N - q + 1, j = N; i < j; i++, j--) { A[i] ^= A[j]; A[j] ^= A[i]; A[i] ^= A[j]; } int jj, n, k = 0, prime[100001], prime_inv[100001], mul[100001] = {}, flag[100001] = {}; for (i = 2; i <= N; i++) { if (flag[i] != 0) continue; prime[k] = i; prime_inv[i] = k++; for (j = i * 2; j <= N; j += i) flag[j] = 1; } for (i = 1; i <= N; i++) flag[i] = 0; for (i = 1; i <= N; i++) { if (flag[i] != 0) continue; for (j = i, jj = A[i], flag[i] = 1; flag[jj] == 0; j = jj, jj = A[j]) flag[jj] = flag[j] + 1; if (flag[j] == 1) continue; for (n = flag[j], j = 0; j < k && prime[j] * prime[j] <= n; j++) { for (jj = 0; n % prime[j] == 0; n /= prime[j], jj++); if (mul[j] < jj) mul[j] = jj; } if (n > 1 && mul[prime_inv[n]] == 0) mul[prime_inv[n]] = 1; } long long ans = 2; for (i = 0; i < k; i++) for (j = 0; j < mul[i]; j++) ans = ans * prime[i] % Mod; printf("%lld\n", ans); fflush(stdout); return 0; }