#JSUTFPC2025L. Solving Equations II —— 解方程 II

Solving Equations II —— 解方程 II

Statement

Let the coefficients of a linear equation with nn variables all be 1, and its sum be mm. Find the number of non-negative integer solutions to this equation modulo 998244353.

In other words, we are seeking the number of non-negative integer solutions to the equation

x1+x2+x3++xn=mx_1+x_2+x_3+\cdots+x_n=m

Since the answer may be very large, please provide the value of the result modulo 998244353.

Input

A line containing two integers nn and mm separated by a space, where 1n,m1×1031\leqslant n,m\leqslant 1\times 10^3.

Output

Output an integer representing the value of the number of non-negative integer solutions to the equation modulo 998244353.

Samples

2 3
4
3 4
15

Notes

The possible outcomes for the first set of samples, x1+x2=3x_1+x_2=3, are:

  1. x1=0,x2=3x_1=0,x_2=3,
  2. x1=1,x2=2x_1=1,x_2=2,
  3. x1=2,x2=1x_1=2,x_2=1,
  4. x1=3,x2=0x_1=3,x_2=0.

There are 4 sets of solutions.