Simple Math Problem

시간 제한1초메모리 제한2048 MB

문제

Given two positive integers $m$ and $n$, determine the value of the following formula modulo $998\,244\,353$:

$$\sum_{i=0}^{\left\lfloor\frac{m}{2}\right\rfloor} \sum_{j=0}^{\left\lfloor\frac{n}{2}\right\rfloor} {i+j \choose j}^2{m+n-2i-2j \choose n-2j}\text{.}$$

Here, $a \choose b$ is a binomial coefficient (the number of ways to choose an unordered subset of $b$ items from a fixed set of $a$ items).

입력

The first line contains one integer $T$ ($1 \le T \le 10^5$) denoting the number of test cases.

For each test case, the input is a single line containing two integers $m$ and $n$ ($1 \le m, n \le 10^5$).

출력

For each test case, output one line containing one integer: the value of the formula modulo $998\,244\,353$.