Your task is to calculate the number of arrays such that:  each array contains $n$ elements;  each element is an integer from $1$ to $m$;  for each array, there is exactly one pair of equal elements;  for each array $a$, there exists an index $i$ such that the array is strictly ascending before the $i$-th element and strictly descending after it (formally, it means that $a_j < a_{j + 1}$, if $j < i$, and $a_j > a_{j + 1}$, if $j \ge i$). 


-----Input-----

The first line contains two integers $n$ and $m$ ($2 \le n \le m \le 2 \cdot 10^5$).


-----Output-----

Print one integer — the number of arrays that meet all of the aforementioned conditions, taken modulo $998244353$.


-----Examples-----
Input
3 4

Output
6

Input
3 5

Output
10

Input
42 1337

Output
806066790

Input
100000 200000

Output
707899035



-----Note-----

The arrays in the first example are:  $[1, 2, 1]$;  $[1, 3, 1]$;  $[1, 4, 1]$;  $[2, 3, 2]$;  $[2, 4, 2]$;  $[3, 4, 3]$.

Difficulty: interview

Starter code:

Solutions:
import sys
input = sys.stdin.readline

n,m=list(map(int,input().split()))
mod=998244353

FACT=[1]
for i in range(1,2*10**5+1):
    FACT.append(FACT[-1]*i%mod)

FACT_INV=[pow(FACT[-1],mod-2,mod)]
for i in range(2*10**5,0,-1):
    FACT_INV.append(FACT_INV[-1]*i%mod)

FACT_INV.reverse()

def Combi(a,b):
    if 0<=b<=a:
        return FACT[a]*FACT_INV[b]*FACT_INV[a-b]%mod
    else:
        return 0

if n==2:
    print(0)
else:
    print(Combi(m,n-1)*(n-2)*pow(2,n-3,mod)%mod)


n, m = map(int, input().split())

if n < 3:
	print(0)
	return

mod = 998244353 
def C(n, k):
	if k > n: return 0
	k = min(k, n-k)
	a = 1
	b = 1
	for i in range(k):
		a = (a*(n-i))%mod
		b = (b*(i+1))%mod
	return (a*pow(b, mod-2, mod))%mod

a = ((n-2)*pow(2, n-3, mod))%mod
b = (m-n+2)*C(m, n-2)
b = (b*pow(n-1, mod-2, mod))%mod

ans = (a*b)%mod
print(ans)

class Combination:
    def __init__(self, n, MOD):
        self.fact = [1]
        for i in range(1, n + 1):
            self.fact.append(self.fact[-1] * i % MOD)
        self.inv_fact = [0] * (n + 1)
        self.inv_fact[n] = pow(self.fact[n], MOD - 2, MOD)
        for i in reversed(range(n)):
            self.inv_fact[i] = self.inv_fact[i + 1] * (i + 1) % MOD
        self.MOD = MOD

    def factorial(self, k):
        return self.fact[k]

    def inverse_factorial(self, k):
        return self.inv_fact[k]

    def permutation(self, k, r):
        if k < r:
            return 0
        return (self.fact[k] * self.inv_fact[k - r]) % self.MOD

    def combination(self, k, r):
        if k < r:
            return 0
        return (self.fact[k] * self.inv_fact[k - r] * self.inv_fact[r]) % self.MOD



n, m = map(int, input().split())
MOD = 998244353
comb = Combination(2 * 10 ** 5 + 10, MOD)

ans = 0
pow_ = pow(2, n - 2, MOD)
for i in range(1, m + 1):
    tmp = comb.combination(i - 1, n - 2)
    tmp *= pow_
    tmp *= n - 2
    ans += tmp
    ans %= MOD
print(ans * pow(2, MOD - 2, MOD) % MOD)

n,m=map(int,input().split())
mod=998244353

n_max=2*(10**5+1)
F,FI=[0]*(n_max+1),[0]*(n_max+1)
F[0],FI[0]=1,1
for i in range(n_max):
  F[i+1]=(F[i]*(i+1))%mod
FI[n_max-1]=pow(F[n_max-1],mod-2,mod)
for i in reversed(range(n_max-1)):
  FI[i]=(FI[i+1]*(i+1))%mod
def comb(x,y):
  return (F[x]*FI[x-y]*FI[y])%mod

print((comb(m,n-1)*(n-2)*(pow(2,n-3,mod)))%mod)

import math, collections, sys
input = sys.stdin.readline
def ncr(n, r, p):
    num = den = 1 
    for i in range(r):
        num = (num * (n - i)) % p 
        den = (den * (i + 1)) % p 
    return (num * pow(den, p - 2, p)) % p 
n, m = map(int, input().split())
mod = 998244353
if n == 2:
    print(0)
else:
    ans = ncr(m, n-1, mod)
    ans*=(n-2)
    ans%=mod
    ans*=pow(2, n-3, mod)
    ans%=mod
    print(ans)

#!/usr/bin/env python3

MOD = 998244353
n,m = list(map(int,input().split()))

def go(a, b, c):
    ans = 1
    while b > 0:
        if b%2 == 1:
            ans *= a
            ans %= c
        b //= 2
        a *= a
        a %= c
    return ans

if n == 2:
    print(0)
else:
    start = (n-2)*go(2, n-3, MOD)
    start %= MOD
    bunja = 1
    bunmo = 1
    for i in range(n, m+1):
        bunja *= i
        bunmo *= (i-n+1)
        bunja %= MOD
        bunmo %= MOD

    #ans = start * bunja // bunmo
    start *= bunja
    temp = go(bunmo, MOD-2, MOD)
    ans = start * temp
    ans %= MOD
    print(ans)