시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB333100.000%

문제

Posted on a blog are $N+M$ harsh comments. You made $N$ comments, and the $i$-th of them has $A_i$ downvotes. The $i$-th of the other $M$ comments has $B_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,\ldots,x_k$ be numbers of downvotes the remaining comments have. Then, he will choose the $i$-th of them with the probability $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 $998244353$ as usual. We can prove that such representation is always possible under the constraints of this problem.

입력

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

The second line contains integers $A_1,A_2,\ldots,A_N$ ($1 \leq A_i \leq 100$).

The third line contains integers $B_1,B_2,\ldots,B_M$ ($1 \leq B_i$, $\sum_{1 \leq i \leq N} A_i + \sum_{1 \leq i \leq M} B_i < 998244353$).

출력

Print the answer.

예제 입력 1

1 2
1
1 1

예제 출력 1

2

예제 입력 2

1 1
2
1

예제 출력 2

332748119

예제 입력 3

3 3
2 3 5
7 11 900000000

예제 출력 3

636512475