Harsh Comments

아직 제출이 없습니다시간 제한1초메모리 제한1024 MB

문제

Posted on a blog are N+MN+M harsh comments. You made NN comments, and the ii-th of them has A_iA\_i downvotes. The ii-th of the other MM comments has B_iB\_i downvotes.

Mike is going to delete the comments, one by one, by repeating the following operation:

  • Choose a comment randomly and delete it. More precisely, let x_1,x_2,,x_kx\_1,x\_2,\ldots,x\_k be numbers of downvotes the remaining comments have. Then, he will choose the ii-th of them with the probability x_i/(_1jkx_j)x\_i/\left(\sum\_{1\leq j \leq k}x\_j \right) and detele it.

Note that the choices in the operations are independent.

Find the expected number of operations Mike will do until he deletes all of your comments. The answer is a rational number, so print it modulo 998244353998244353 as usual. We can prove that such representation is always possible under the constraints of this problem.

입력

The first line contains integers NN and MM (1N,M1001 \leq N,M \leq 100).

The second line contains integers A_1,A_2,,A_NA\_1,A\_2,\ldots,A\_N (1A_i1001 \leq A\_i \leq 100).

The third line contains integers B_1,B_2,,B_MB\_1,B\_2,\ldots,B\_M (1B_i1 \leq B\_i, _1iNA_i+_1iMB_i<998244353\sum\_{1 \leq i \leq N} A\_i + \sum\_{1 \leq i \leq M} B\_i < 998244353).

출력

Print the answer.