such crew members, which he may assign to any ship.
A voyage's chance of success is defined as the minimum ratio between a voyage attribute and the sum of all crew members in that attribute, and maxes out at . For example, if both the Anti-seasickness and Pathfinding requirements are met while the requirement for Coding is
but the crew only provides
, the voyage's chance of success will be
.
Since
has to manage many ships at once, determining his maximum chance of success would go a long way towards increasing his status as a harbourmaster. Can you help him?Input Specification
The first line of input will contain three integers representing the voyage's Coding, Anti-seasickness, and Pathfinding requirements respectively
.
The second line of input will contain
.
For the next lines, line
will represent the attributes of the
-th crew member
in the same order as given for the voyage
.
Output Specification
's maximum chance of success if he assigns his crew optimally, rounded to one decimal place.
Sample Input
10 10 100
2
0 5 0
9 0 2
Sample Output
2.0
Explanation
The crew got lost, because while the voyage had Coding and
Anti-seasickness, their Pathfinding total was
.
Comments
.