A sequence is called a "nice sequence" if it has length $n$, every number in the sequence is an integer between $1$ and $m$, and every integer from $1$ to $m$ appears at least once in the sequence.
For a sequence $A$, let $f_A(l, r)$ be the index of the maximum value in $A$ from the $l$-th to the $r$-th element (if there are multiple maximums, choose the one with the smallest index).
Two sequences $A$ and $B$ are isomorphic if and only if they have the same length and, for all $i \le j$, $f_A(i, j) = f_B(i, j)$.
Given $n$ and $m$, find the number of non-isomorphic nice sequences. The answer should be taken modulo $998244353$.
Input
A single line containing two positive integers $n$ and $m$.
Output
A single integer representing the number of non-isomorphic nice sequences.
Examples
Input 1
3 2
Output 1
4
Note 1
There are $6$ nice sequences in total: $2\ 1\ 1$, $1\ 2\ 1$, $1\ 1\ 2$, $1\ 2\ 2$, $2\ 1\ 2$, and $2\ 2\ 1$. Among these, $2\ 1\ 1$ and $2\ 2\ 1$ are isomorphic, and $1\ 2\ 1$ and $1\ 2\ 2$ are isomorphic. Therefore, there are $4$ non-isomorphic nice sequences.
Input 2
8 5
Output 2
1341
Input 3
100000 99999
Output 3
944488805
Input 4
300 200
Output 4
430256456
Input 5
2000 1000
Output 5
267823945
Input 6
100000 50000
Output 6
779381353
Subtasks
| Subtask | $n,m\leq$ | Special Property | Score |
|---|---|---|---|
| 1 | $8$ | $10$ | |
| 2 | $100000$ | $m\ge n-1$ | $10$ |
| 3 | $300$ | $30$ | |
| 4 | $2000$ | $20$ | |
| 5 | $100000$ | $30$ |