2022 Azerbaijan - semifinals

The number of paths

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.


One line contains two integers n and m (0n, m109).


Print the remainder after dividing the number of different paths by 998244353.


Time limit 1 second
Memory limit 128 MiB
Input example #1
1 1
Output example #1
Input example #2
3 3
Output example #2
Source 2022 Azerbaijan Republic Olympiad, Semifinals, March 8