#P1493. 分梨子
分梨子
Description
There is a pear tree in Finley's yard, and it has recently produced many pears. Finley decides to pick some pears to distribute to the kindergarten children. However, the pears vary in size and taste, so it is important to choose pears that are as similar as possible to give to the kids, so that those who get smaller pears will not cry.
Each pear has two attributes, and , representing the pear's size and sweetness, respectively. Suppose among the selected pears, the minimum values of the two attributes are and . As long as for every selected pear , the inequality holds (where and are known constants), then these pears are considered similar enough and can be given to the children.
As the kindergarten principal, can you compute the maximum number of pears that can be selected?
Input Format
The first line contains an integer (), the total number of pears.
The second line contains three positive integers, and (, ).
The next lines each contain two integers. On the -th line, the two integers are and .
Output Format
Output a single integer, the maximum number of pears that can be selected.
3
2 3 6
3 2
1 1
2 1
2
Hint
Sample explanation: You can choose pears or .
Translated by ChatGPT 5
京公网安备 11011102002149号