{"trustable":true,"sections":[{"title":"Description","value":{"format":"MD","content":"Once again in the autumn, Tao Tao\u0027s apple tree bore $n$ fruits. Tao Tao went to pick apples again, this time with a chair $a$ centimeters tall. When he couldn\u0027t reach, he would stand on the chair and try again.\n\nUnlike the first question of the NOIp2005 popular group, this time Tao Tao only has $s$ strength left after moving the chair. Of course, he needs to exert a certain amount of strength each time he picks an apple. Tao Tao wants to know how many apples he can pick at most before $s\u003c0$.\n\nNow it is known that the height from the ground to $n$ apples is $x_i$, the height of the chair is $a$, Tao Tao\u0027s maximum arm length is $b$, the remaining strength of Tao Tao is $s$, and the strength needed to pick an apple is $y_i$. Find out the maximum number of apples Tao Tao can pick."}},{"title":"Input","value":{"format":"MD","content":"Line $1$: Two numbers, the number of apples $n$, and the strength $s$.\n\nLine $2$: Two numbers, the height of the chair $a$, and Tao Tao\u0027s maximum arm length $b$.\n\nLine $3$ to Line $3+n-1$: Two numbers on each line, the height of the apple $x_i$, and the strength needed to pick this apple $y_i$."}},{"title":"Output","value":{"format":"MD","content":"Only one integer, representing the maximum number of apples Tao Tao can pick."}},{"title":"Sample 1","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e8 15\n20 130\n120 3\n150 2\n110 7\n180 1\n50 8\n200 0\n140 3\n120 2\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e4\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}},{"title":"Hint","value":{"format":"MD","content":"For the data of $100\\%$, $n\\leq 5000$, $a\\leq 50$, $b\\leq 200$, $s\\leq 1000$, $x_i\\leq 280$, $y_i\\leq 100$."}}]}