Slime and his $n$ friends are at a party. Slime has designed a game for his friends to play.

At the beginning of the game, the $i$-th player has $a_i$ biscuits. At each second, Slime will choose a biscuit randomly uniformly among all $a_1 + a_2 + \ldots + a_n$ biscuits, and the owner of this biscuit will give it to a random uniform player among $n-1$ players except himself. The game stops when one person will have all the biscuits.

As the host of the party, Slime wants to know the expected value of the time that the game will last, to hold the next activity on time.

For convenience, as the answer can be represented as a rational number $\frac{p}{q}$ for coprime $p$ and $q$, you need to find the value of $(p \cdot q^{-1})\mod 998\,244\,353$. You can prove that $q\mod 998\,244\,353 \neq 0$.


-----Input-----

The first line contains one integer $n\ (2\le n\le 100\,000)$: the number of people playing the game.

The second line contains $n$ non-negative integers $a_1,a_2,\dots,a_n\ (1\le a_1+a_2+\dots+a_n\le 300\,000)$, where $a_i$ represents the number of biscuits the $i$-th person own at the beginning.


-----Output-----

Print one integer: the expected value of the time that the game will last, modulo $998\,244\,353$.


-----Examples-----
Input
2
1 1

Output
1

Input
2
1 2

Output
3

Input
5
0 0 0 0 35

Output
0

Input
5
8 4 2 0 1

Output
801604029



-----Note-----

For the first example, in the first second, the probability that player $1$ will give the player $2$ a biscuit is $\frac{1}{2}$, and the probability that player $2$ will give the player $1$ a biscuit is $\frac{1}{2}$. But anyway, the game will stop after exactly $1$ second because only one player will occupy all biscuits after $1$ second, so the answer is $1$.

Difficulty: HARD

Solutions:
import os
import sys
input = sys.stdin.buffer.readline
from collections import deque
import math

class CF(object):

	def __init__(self):
		self.mod = 998244353
		self.n = int(input())
		self.a = list(map(int, input().split()))
		self.tot = sum(self.a)
		self.dp = [[0, 0] for _ in range(self.tot + 1)]

	def inv(self, x):
		return pow(x, self.mod - 2, self.mod)

	def gao(self):
		self.dp[0] = [0, 1]
		self.dp[1] = [(1 - self.n + self.mod) % self.mod, 1]
		for k in range(1, self.tot):
			temp = self.inv(self.tot - k)
			self.dp[k + 1][0] = -self.tot * (self.n - 1) - self.dp[k][0] * (2 * k - self.tot - k * self.n) - self.dp[k - 1][0] * k * (self.n - 1)
			self.dp[k + 1][0] *= temp
			self.dp[k + 1][0] = (self.dp[k + 1][0] % self.mod + self.mod) % self.mod
			self.dp[k + 1][1] = -self.dp[k][1] * (2 * k - self.tot - k * self.n) - self.dp[k - 1][1] * k * (self.n - 1)
			self.dp[k + 1][1] *= temp
			self.dp[k + 1][1] = (self.dp[k + 1][1] % self.mod + self.mod) % self.mod
		alpha = -self.dp[self.tot][0] * self.inv(self.dp[self.tot][1])
		alpha = (alpha % self.mod + self.mod) % self.mod
		ans = 0
		for i in range(self.n):
			ans += self.dp[self.a[i]][0] + self.dp[self.a[i]][1] * alpha
			ans = (ans % self.mod + self.mod) % self.mod
		ans -= alpha * (self.n - 1)
		ans = (ans % self.mod + self.mod) % self.mod
		ans *= self.inv(self.n)
		ans = (ans % self.mod + self.mod) % self.mod
		print(ans)

	def main(self):
		self.gao()
		pass
cf = CF()
cf.main()
pass


import sys

def II():
	return int(sys.stdin.readline())

def LI():
	return list(map(int, sys.stdin.readline().split()))

class mint:

	def __init__(self, x):
		self.__x = x % md

	def __repr__(self):
		return str(self.__x)

	def __neg__(self):
		return mint(-self.__x)

	def __add__(self, other):
		if isinstance(other, mint):
			other = other.__x
		return mint(self.__x + other)

	def __sub__(self, other):
		if isinstance(other, mint):
			other = other.__x
		return mint(self.__x - other)

	def __rsub__(self, other):
		return mint(other - self.__x)

	def __mul__(self, other):
		if isinstance(other, mint):
			other = other.__x
		return mint(self.__x * other)
	__radd__ = __add__
	__rmul__ = __mul__

	def __truediv__(self, other):
		if isinstance(other, mint):
			other = other.__x
		return mint(self.__x * pow(other, md - 2, md))

	def __rtruediv__(self, other):
		return mint(other * pow(self.__x, md - 2, md))

	def __pow__(self, power, modulo=None):
		return mint(pow(self.__x, power, md))
md = 998244353

def main():
	n = II()
	aa = LI()
	sa = sum(aa)
	dp = [mint(0)] * (sa + 1)
	for i in range(1, sa + 1):
		dp[i] = ((i - 1) * dp[i - 1] + sa) * (n - 1) / (sa + 1 - i)
	for i in range(sa):
		dp[i + 1] += dp[i]
	ans = -(n - 1) * dp[-1]
	for a in aa:
		ans += dp[sa] - dp[a]
	print(ans / n)
main()


MOD = 998244353
n = int(input())
a = list(map(int, input().split()))
tot = sum(a)

def inv(x):
	return pow(x, MOD - 2, MOD)
l = [0, pow(n, tot, MOD) - 1]
for i in range(1, tot):
	aC = i
	cC = (n - 1) * (tot - i)
	curr = (aC + cC) * l[-1]
	curr -= tot * (n - 1)
	curr -= aC * l[-2]
	curr *= inv(cC)
	curr %= MOD
	l.append(curr)
out = 0
for v in a:
	out += l[tot - v]
	out %= MOD
zero = l[tot]
out -= (n - 1) * zero
out *= inv(n)
print(out % MOD)