CF908D New Year and Arbitrary Arrangement

Description

You are given three integers $ k $ , $ p_{a} $ and $ p_{b} $ . You will construct a sequence with the following algorithm: Initially, start with the empty sequence. Each second, you do the following. With probability $ p_{a}/(p_{a}+p_{b}) $ , add 'a' to the end of the sequence. Otherwise (with probability $ p_{b}/(p_{a}+p_{b}) $ ), add 'b' to the end of the sequence. You stop once there are at least $ k $ subsequences that form 'ab'. Determine the expected number of times 'ab' is a subsequence in the resulting sequence. It can be shown that this can be represented by $ P/Q $ , where $ P $ and $ Q $ are coprime integers, and $Q \ne 0 \bmod (10^9+7)$. Print the value of $P \cdot Q^{-1} \bmod (10^9+7)$.

Input Format

The first line will contain three integers integer $ k,p_{a},p_{b} $ ( $ 1 \le k \le 1000 $ , $ 1 \le p_{a},p_{b} \le 1000000 $ ).

Output Format

Print a single integer, the answer to the problem.

Explanation/Hint

The first sample, we will keep appending to our sequence until we get the subsequence 'ab' at least once. For instance, we get the sequence 'ab' with probability 1/4, 'bbab' with probability 1/16, and 'aab' with probability 1/8. Note, it's impossible for us to end with a sequence like 'aabab', since we would have stopped our algorithm once we had the prefix 'aab'. The expected amount of times that 'ab' will occur across all valid sequences is 2. For the second sample, the answer is equal to $\frac{341}{100}$.