278. Fuel

Time limit per test: 2 seconds
Memory limit: 64 megabytes
input: standard
output: standard


A fuel station has infinite amount of each of kinds of fuel. Each kind of fuel has density , cost and intensity . kilograms of such fuel has volume , intensity and costs dollars. Your car can store any mixture of different kinds of fuel such that the overall volume does not exceed . You have dollars. Your task is to determine the maximal overall intensity of the fuel you can buy. Note that you can buy any nonnegative amount of any kind of fuel, not necessarily an integer number of kilograms.

Input
The first line of the input contains three integers , , (, ). Each of the next lines describes one kind of fuel. -st line contains three integers , , ().

Output
The only line of the output must contain single number with at least 6 digits after the decimal point, being the maximal overall intensity.

Example(s)
sample input
sample output
2 1 1 
1 2 6
2 1 6
4.000000



Novosibirsk SU Contest #2, by Novosibirsk Team #1
Online Contester Team © 2002 - 2004. All rights reserved.