The number of paths
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
On a checkered sheet of n rows and m columns, find the number of different paths from the upper left corner to the lower right, provided that in one move you can move the checker either down, or up, or to the right, or up - right (diagonally).
You can move a checker to any position no more than once. The figure shows an example of a path on a sheet 3 × 3:
Here, the upper left corner is marked with A and the lower right corner is marked with B. In this example, the number of distinct paths is 343.
Input
One line contains two integers n and m (0 ≤ n, m ≤ 10^9
).
Output
Print the remainder after dividing the number of different paths by 998244353.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 1K
Acceptance rate 39%