Luna is shopping at a magic shop, where $$$n$$$ kinds of items are on sale. The value of the $$$i$$$-th kind of item is $$$v_i$$$, and the weight is $$$w_i$$$. The number of items is infinity. Luna's pocket can carry items with a total weight of no more than $$$k$$$. Each time, Luna can take one item of any kind. She can take at most $$$m$$$ times.
In order to take more items, Luna uses magic so that if the number of items she buys is $$$i$$$, she can carry a total weight of at most $$$i+k$$$. Her happiness of shopping is the product of the value over all the items she buys. If she buys nothing, the happiness is $$$1$$$.
There are many ways to buy items, and she wants to know the sum of happiness of all the possible ways of shopping. Since the number can be very large, just tell her the number modulo $$$998244353$$$.
Two ways of shopping are considered different if the number of times to take items are different or she takes a different kind of item at one time.
The first line of input contains three integers $$$n,m,k$$$ ($$$1\le n,m,k\le 10^5$$$), indicating the number of kinds of items, the maximum number of times to take items, and the capacity of the pocket.
Each of the following $$$n$$$ lines contains two integers $$$v,w$$$ ($$$1\le v \lt 998244353$$$, $$$0\le w\le m+k$$$), indicating the value and weight of the kind of item. It is guaranteed that there exists a kind of item that $$$w=0$$$.
Print a single integer denoting the sum of happiness modulo $$$998244353$$$.
1 1 1 1 0
2
3 2 3 8 2 5 3 2 0
216
7 4 6 8 2 5 3 2 0 4 2 7 5 5 8 11 2
983858
The explanation of example 1:
The explanation of example 2:
| Название |
|---|


