Expected Shopping

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

문제

You want to buy mm cans of chips. There are nn different shops, and each shop has enough cans of chips to cover your needs. The price of a single can of chips at ii-th shop is a_ia\_i coins. You don't like to pay more than BB coins for a can, so if at some shop jj the price of a can is a_j>Ba\_j > B, then for you this price is unreasonable. Otherwise, it is reasonable.

You may visit shops in arbitrary order, but each shop can be visited no more than once.

Let us assume that you visit shop jj and you still need to buy kk cans of chips. If the price at this shop is reasonable (a_jBa\_j \le B), then you buy kk cans at this shop and go home without visiting any shop afterwards. Otherwise, you buy only one can of chips, and if you still need to buy some cans, you proceed to the next shop.

As soon as you have mm cans of chips, you finish your shopping trip. It is guaranteed that there are at least mm shops, so this has to happen eventually.

Calculate the expected number of coins you will spend if each possible shopping plan is equiprobable. Formally, this means that each permutation of nn numbers denoting the order in which you plan to visit the shops has the same probability of being chosen. The answer must be calculated as a rational fraction pq\frac{p}{q}, where q>0q > 0 and gcd(p,q)=1\mathrm{gcd} (p, q) = 1.

입력

The first line contains three integers: nn, mm, and BB (1mn81051 \le m \le n \le 8 \cdot 10^{5}, 1B51061 \le B \le 5 \cdot 10^{6}).

The second line contains nn integers a_1,a_2,,a_na\_1, a\_2, \ldots, a\_n, where a_ia\_i is the price of a single can of chips at ii-th shop (1a_i51061 \le a\_i \le 5 \cdot 10^{6}).

출력

Let pp and qq be the numbers such that pq\frac{p}{q} is the expected number of coins you will spend, q>0q > 0 and gcd(p,q)=1\mathrm{gcd} (p, q) = 1. Print pp on the first line and qq on the second line of the output.