
Rose woke up in a mystical flower field. Since her name is Rose, she wants to collect as many of the $$$N$$$ roses in the field with her $$$E$$$ energy level (convince yourself that Rose can keep track of her energy quantitatively). Rose also enjoys running and moves at a speed of $$$1$$$ rosemeters/second. However, once a rose $$$i$$$ is picked from the field, the other roses disappear, and a rain monster will appear a distance $$$r_i$$$ rosemeters away from the rose and is restricted to moving along the perimeter with radius $$$r_i$$$ (centered at the rose).
Unfortunately for Rose, the rain monster has been spending lots of time at ✨ Rainy Day Monster Running and Fitness Center ✨ and will move $$$k_i$$$ times faster than Rose and does its best to catch Rose. For each rose, Rose has two options. Rose can move directly away from the rose. Alternatively, she can run along a circle of radius $$$e$$$ rosemeters centered at the rose, but she can only do this once for the current rose, which costs her $$$\lceil e\rceil$$$ energy, and she can choose to run along this circle forever if she wants to. Once she escapes the clutches of the monster, all the other roses reappear.
What is the maximum number of roses Rose can collect with her $$$E$$$ energy, given that she can choose to collect the Roses in any order she wants? Note that Rose can choose not to collect certain roses if she does not want to.
A diagram of the field is shown below (as well as two separate possible paths Rose could take assuming that the monster cannot catch her–note that path 2 will cost some $$$e$$$ energy):

The first line contains $$$N$$$ ($$$1\leq N\leq 500$$$), the number of roses and her energy level $$$E$$$ ($$$1 \leq E \leq 10^5$$$).
The next $$$N$$$ lines will contain two real numbers, the distance the monster spawns away from Rose $$$r_i$$$ ($$$1\leq r_i\leq 500$$$), and its speed factor compared to Rose $$$k_i$$$ ($$$1\leq k_i\leq 10^9$$$).
A single integer, the maximum number of roses Rose can collect with her $$$E$$$ energy.
4 5 5.00 4.00 1.00 2.00 1.15 3.15 6.00 5.00
3
| Name |
|---|


