{"raw_statement":[{"iden":"problem statement","content":"We have a grid with $H$ rows and $W$ columns. Let $(i, j)$ denote the square at the $i$\\-th row from the top and $j$\\-th column from the left.  \nAssume that this grid is a torus; that is, in addition to the pairs of squares horizontally or vertically adjacent to each other, assume the following pairs of squares to be adjacent to each other.\n\n*   $(i,1)$ and $(i,W)$, for every integer $i$ such that $1 \\leq i \\leq H$.\n*   $(1,j)$ and $(H,j)$, for every integer $j$ such that $1 \\leq j \\leq W$.\n\nConsider placing some number of pieces on the squares in the grid. Here, there can be at most one piece on each square, and there cannot be two pieces on adjacent squares.  \nLet $L$ be the maximum number of pieces that can be placed. Find the number of ways, modulo $998244353$, to place $L$ pieces."},{"iden":"constraints","content":"*   $2 \\leq H \\leq 10^5$\n*   $2 \\leq W \\leq 10^{10}$\n*   $H$ and $W$ are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$H$ $W$"},{"iden":"sample input 1","content":"3 2"},{"iden":"sample output 1","content":"6\n\nThe following six placements satisfy the condition. Here, `#` and `.` represent a square with and without a piece, respectively.\n\n#.   #.   .#   .#   ..   ..\n.#   ..   #.   ..   #.   .#\n..   .#   ..   #.   .#   #."},{"iden":"sample input 2","content":"139 424"},{"iden":"sample output 2","content":"148734121"},{"iden":"sample input 3","content":"12345 1234567890"},{"iden":"sample output 3","content":"227996418"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}