World Cup Betting

Given N at most 10 matches with hit probabilities and odds, find the probability that a fixed-fraction bettor ends with more money than he started.

Easy3ProbabilityBrute forceInterviewNo attempts yetTime limit1sMemory limit32 MB

Problem

Jeonghwan wants to practice on league matches before he bets big on the World Cup winner. He will bet on NN matches, played one after another from match 1 to match NN. On every match he stakes MM percent of the money he holds at that moment.

For every match he has already decided whether to bet on a win, a draw or a loss, and he has worked out the hit probability PiP_i and the odds RiR_i. On match ii he calls the result correctly with probability PiP_i percent, and a correct call pays him RiR_i times his stake. With the remaining 100Pi100 - P_i percent he loses the whole stake. For example, if he holds 100000 won and stakes 10000 won on a match with odds 1.11.1, a correct call leaves him the untouched 90000 won plus 11000 won, so 101000 won.

If his money ever drops to BB percent of his starting money or below, Jeonghwan stops betting on the spot and stakes nothing on the remaining matches. He stops even when the next match pays 5.05.0 and he calls it right 99 percent of the time.

Given the betting information, find the probability that Jeonghwan ends with more money than he started with.

Input

The first line has the number of matches NN, the share MM of his money that he stakes on one match, and the threshold BB at which he stops betting, separated by spaces. (1N101 \le N \le 10, 1M991 \le M \le 99, 1B991 \le B \le 99)

Each of the next NN lines has the hit probability PiP_i and the odds RiR_i of match ii. (1Pi991 \le P_i \le 99, 1.0<Ri5.01.0 < R_i \le 5.0)

NN, MM, BB, PiP_i are integers, and MM, BB, PiP_i are percentages. RiR_i is given with one digit after the decimal point.

Output

Print the probability that Jeonghwan wins money, as a percentage. Ending with exactly the money he started with does not count as winning.

Round the value to six digits after the decimal point, and round up when the discarded part is exactly one half. A probability of 3535 percent prints as 35.000000.