Equalizer Ehrmantraut

Time limit: 0.7s Memory limit: 256MB Input: Output:

You know how they say, 'It's been a pleasure?' It hasn't.

When Mike Ehrmantraut started being a cop, he wanted all people to be equal before the law. Now he is retired, but he still prefers \textbf{almost equal} arrays.

Here two arrays $a$ and $b$ of length $n$ are called \textbf{almost equal} if the following condition holds:

• For any $1 \leq i < j \leq n$, $min(a_i, b_j) = min(a_j, b_i)$

Given two integers $n$ and $m$, find the number of \textbf{almost equal} pairs $(a, b)$ of integer arrays of length $n$ with elements from $1$ to $m$. As this number can be large, output it modulo $998 \ 244 \ 353$.

Input data

The only line of the input contains two integers $n, m$ ($1 \leq n, m \leq 10^6$).

Output data

Output a single integer - output to the problem modulo $998 \ 244 \ 353$.

Example 1

stdin

1 3


stdout

9


Explanation

In the first sample, any pair of arrays $([x], [y])$ with $1 \leq x, y \leq 3$ satisfies the conditions from the statement, there are $9$ of them.

Example 2

stdin

2 2


stdout

10


Explanation

In the second sample, there are the $10$ pairs of arrays: $([1, 1], [1, 1])$, $([1, 1], [1, 2])$, $([1, 1], [2, 1])$, $([1, 1], [2, 2])$, $([1, 2], [1, 1])$, $([1, 2], [1, 2])$, $([2, 1], [1, 1])$, $([2, 1], [2, 1])$, $([2, 2], [1, 1])$, $([2, 2], [2, 2])$.

Example 3

stdin

69 42


stdout

608932821