P12735 Repay

Background

> From my point of view, I would have to come up with even more to really repay her for everything she's done.\ --Yuta Asamura

Description

Yuta needs to help Saki find suitable study music. He has found an album containing $n$ songs, numbered from $1$ to $n$. Playing each song takes exactly $1$ minute. Saki has two courses, A and B, that she needs to study, and each time she study for A and B takes $a$ and $b$ minutes, respectively. To better assist her, Yuta plans to rearrange the order in which the songs are played. Specifically, he wants to choose a permutation $p_1, \dots, p_n$ of length $n$ such that there exist two cycles $A$ and $B$ of lengths $a$ and $b$, respectively, and every element in $A$ is less than every element in $B$. In a permutation, a cycle $C$ of length $k$ is a sequence $c_1, \dots, c_k$ composed of different integers, where $1 \leq c_1 \leq n$, $c_{i+1} = p_{c_i}$ for $i = 1, \dots, k-1$, and $p_{c_k} = c_1$. Yuta wants to determine how many such permutations $p$ exist. Since the answer could be very large, you only need to provide the result modulo $998244353$.

Input Format

Input a single line containing three integers representing the sequence length $n$ and $a, b$.

Output Format

Output a single integer on a line, indicating the number of permutations that satisfy the requirements, modulo $998244353$.

Explanation/Hint

#### Sample 1 Explanation The permutations that satisfy the requirements are $(2,1,3,4)$, $(3,2,1,4)$, and $(1,3,2,4)$, totaling $3$ permutations. #### Constraints **This problem enables subtask scoring and subtask dependence, with the constraints and scores for each subtask as follows.** | Subtask No. | $n\le$ | Special Constraint | Score | Depends on Subtask | | :-: | :-: | :-: | :-: | :-: | | $1$ | $10$ | Yes | $7$ | | | $2$ | $700$ | Yes | $10$ | $1$ | | $3$ | $700$ | No | $20$ | $1,2$ | | $4$ | $2000$ | Yes | $10$ | $1,2$ | | $5$ | $2000$ | No | $30$ | $1,2,3,4$ | | $6$ | $10^6$ | Yes | $20$ | $1,2,4$ | | $7$ | $10^6$ | No | $3$ | $1,2,3,4,5,6$ | Special constraint: $\min(a,b)=1$. For all of the testdata, $1\le n\le10^6$, $1\le a,b