#P4831. Scarlet loves WenHuaKe

Scarlet loves WenHuaKe

Description

Scarlet tries to place 2×n2\times n cannons on an nn-row mm-column Chinese chessboard such that none of them can attack each other.

As everyone knows, Scarlet loves making trouble. She wants to ask how many valid configurations there are.

Input Format

One line with two integers, representing nn and mm.

Output Format

One integer, the number of configurations modulo 998244353998244353.

4 4
90

Hint

For 20%20\% of the testdata, n,m5n,m\leq5.

For another 25%25\% of the testdata, n,m2000n,m\leq2000.

For another 20%20\% of the testdata, n=mn=m.

For the remaining 35%35\% of the testdata, mn10m-n\leq10.

For 100%100\% of the testdata, 1nm1000001\leq n\leq m\leq100000.

Translated by ChatGPT 5