Alex wants to get a girlfriend. He discovered a dating app similar to Tinder. The app shows Alex different girls. He can swipe left or right on their photo. If he swipes right on a photo of a certain girl and she swipes right on his, then they match and can start chatting in the app.
Because he did not purchase the pro version, Alex has a limited number of right swipes. The app estimates for each girl the probability that she will swipe right on Alex. Moreover, the app will decrease the number of available swipes by a different value depending on the girl Alex swipes right on.
Help Alex find out what is the maximum expected number of matches he can get.
Input data
The first line of the input contains the values and , representing the number of girls shown to Alex and the maximum number of right swipes.
The following lines will contain data about the girls.
The line will contain values and , representing the probability that the girl will swipe right on Alex and the value subtracted from the total number of available swipes if Alex swipes right on the girl. Every value will be an integer between and , representing the probability as percentage.
Output data
The output will contain an integer that represents the maximum expected number of matches as a percentage.
Constraints and clarifications
- For tests worth points, .
- For tests worth extra points, .
Example 1
stdin
6 3
70 1
54 3
20 1
9 1
20 2
33 1
stdout
123
Explanation
If Alex swipes right on the first, the third and the sixth girls then the expected number of matches he will get is equal to + + = . It turns out that this is the best he can do.