A. Abstract Paintings
time limit per test
2 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output

After visiting the ancient mosaics in Paphos, an artist decides to create several black-and-white patterns. Each pattern should be a rectangular grid of $$$n$$$ rows and $$$m$$$ columns, satisfying the following properties.

The top and bottom boundaries of the grid are connected to each other, just as the left and right boundaries are, making a torus shape. Formally, let us index rows from $$$0$$$ to $$$n-1$$$ top to bottom, and columns from $$$0$$$ to $$$m-1$$$ left to right. A cell $$$(x, y)$$$ is at the intersection of row $$$x$$$ and column $$$y$$$. Then:

  • cells $$$(x, y)$$$ and $$$((x + 1) \bmod n, y)$$$ are vertically adjacent,
  • cells $$$(x, y)$$$ and $$$(x, (y + 1) \bmod m)$$$ are horizontally adjacent.

Each cell is painted either black or white. A painting is valid if all of the following conditions hold:

  • No two vertically or horizontally adjacent cells are both black.
  • For every cell $$$(i,j)$$$, at least one of the three vertically adjacent cells $$$(i,j)$$$, $$$((i+1) \bmod n,j)$$$, and $$$((i+2) \bmod n,j)$$$ is black.
  • All white cells form one connected region: from any white cell, it is possible to reach any other by moving between adjacent white cells.

Count the number of different valid paintings modulo $$$998\,244\,353$$$. Two paintings are different if the colors of at least one cell differ.

Input

The only line contains two integers $$$n$$$ and $$$m$$$ ($$$3 \le n,m \le 10^6$$$), the number of rows and columns, respectively.

Output

Print the number of valid paintings modulo $$$998\,244\,353$$$.

Examples
Input
3 3
Output
6
Input
3 4
Output
18
Input
6 6
Output
0
Note

In the second example, there are $$$18$$$ valid paintings. One of them is shown below.