#abc231g. [abc231_g]Balls in Boxes

[abc231_g]Balls in Boxes

Problem Statement

We have NN boxes numbered 11 to NN. Initially, Box ii contains AiA_i balls.

You will repeat the following operation KK times.

  • Choose one box out of the NN uniformly at random (each time independently). Add one ball to the chosen box.

Let BiB_i be the number of balls in Box ii after the KK operations, and the score be the product of the numbers of balls, prodi=1NBi\\prod_{i=1}^{N}B_i.

Find the expected value of the score modulo 998244353998244353.

Notes

When the expected value in question is represented as an irreducible fraction p/qp/q, there uniquely exists an integer rr such that rqequivppmod998244353rq\\equiv p \\pmod{998244353} and 0leqr<9982443530\\leq r < 998244353 under the Constraints of this problem. This rr is the value we seek.

Constraints

  • 1leqNleq10001 \\leq N \\leq 1000
  • 1leqKleq1091 \\leq K \\leq 10^9
  • 0leqAileq1090 \\leq A_i \\leq 10^9

Input

Input is given from Standard Input in the following format:

NN KK A1A_1 ldots\\ldots ANA_N

Output

Print the answer.


Sample Input 1

3 1
1 2 3

Sample Output 1

665496245

After the operation, the score will be as follows.

  • When choosing Box 11 in the operation, 2times2times3=122\\times 2\\times 3=12.
  • When choosing Box 22 in the operation, 1times3times3=91\\times 3\\times 3=9.
  • When choosing Box 33 in the operation, 1times2times4=81\\times 2\\times 4=8.

Therefore, the expected value in question is frac13(12+9+8)=frac293\\frac{1}{3}(12+9+8)=\\frac{29}{3}. This value modulo 998244353998244353 is 665496245665496245.


Sample Input 2

2 2
1 2

Sample Output 2

499122182

After the operations, the score will be as follows.

  • When choosing Box 11 in the first operation and Box 11 in the second, 3times2=63\\times 2=6.
  • When choosing Box 11 in the first operation and Box 22 in the second, 2times3=62\\times 3=6.
  • When choosing Box 22 in the first operation and Box 11 in the second, 2times3=62\\times 3=6.
  • When choosing Box 22 in the first operation and Box 22 in the second, 1times4=41\\times 4=4.

Therefore, the expected value in question is frac14(6+6+6+4)=frac112\\frac{1}{4}(6+6+6+4)=\\frac{11}{2}.


Sample Input 3

10 1000000000
998244350 998244351 998244352 998244353 998244354 998244355 998244356 998244357 998244358 998244359

Sample Output 3

138512322