시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 512 MB | 17 | 8 | 8 | 47.059% |
Today Yurik got up early in the morning with a great joy because, according to the schedule, the first lesson in school is a woodwork lesson. It is the favorite Yurik's lesson because he usually ignores teacher and plays board games with his friends at the back of the classroom in this lesson. But he was disappointed when it turned out that the test would take place today.
At the beginning of the lesson the teacher handed out wooden boards of size $N \times M$ to each student, including Yurik. Using lines drawn in pencil, the board is divided into $N$ rows and $M$ columns in such way that it consists of $N \cdot M$ square cells of size $1 \times 1$.
The test is to cut out some cells from the the board using a jigsaw in such way that the the resulting part of the board is nice.
The board is called nice if the following five conditions are satisfied:
Every board that doesn't satisfy at least one of these conditions is called ugly. Images below illustrate examples of nice and ugly boards. The upper-left and lower-right cells are painted grey.
Examples of nice boards of size $3 \times 4$
Examples of ugly boards of size $3 \times 4$
Since Yurik never listens to his teacher and love mathematics, instead of doing the test, he wonders how many different nice boards can be obtained from the original board by cutting away some, possibly zero, number of cells? Two boards are considered different if sets of cut away cells are different.
Please, help Yurik to answer this question.
The only input line contains two integers $N$ and $M$ --- dimensions of the original board ($1 \le N, M \le 10^5$).
Print a single integer --- the number of different nice boards that Yurik can obtain by cutting away some cells from the original board.
As the answer can be very large, you should print it modulo $998\,244\,353$.
2 2
3
2 4
10
100 100
818380736
Images below illustrate the first and the second examples:
All nice boards that can be cut from the original board of size $2 \times 2$
All nice boards that can be cut from the original board of size $2 \times 4$