E. Equalizer Ehrmantraut
time limit per test
3 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
You know how they say, 'It's been a pleasure?' It hasn't.
—Mike Ehrmantraut, Breaking Bad

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 almost equal arrays.

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

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

Given two integers $$$n$$$ and $$$m$$$, find the number of 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 $$$998244353$$$.

Input

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

Output

Output a single integer  — output to the problem modulo $$$998244353$$$.

Examples
Input
1 3
Output
9
Input
2 2
Output
10
Input
69 42
Output
608932821
Note

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.

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])$$$.