During the next century certain regions on earth will experience severe water shortages. The old town of Uqbar has already started to prepare itself for the worst. Recently they created a network of pipes connecting the cisterns that distribute water in each neighborhood, making it easier to fill them at once from a single source of water. But, in case of water shortage, the cisterns above a certain level will be empty since the water will flow to the cisterns bellow.
You have been asked to write a program to compute the level to which
cisterns will be filled with a certain volume of water, given the
dimensions and position of each cistern. To simplify we will neglect the
volume of water in the pipes.
Input specification
As input you receive the number of
cisterns, followed by one line per cistern with 4 floating point
values: its base level, height, width and depth in meters. The last
input line gives you the volume in cubic meters to be injected into
the network.
Output specification
Your program must output the level that the water will
reach, in meters, truncated to two fractional digits. If the volume of water
exceeds the total capacity of the cisterns then your program must
write ``OVERFLOW''.
Sample input
4 11.0 7.0 5.0 1.0 15.0 6.0 4.0 1.0 5.0 8.0 5.0 1.0 19.0 4.0 8.0 1.0 78.0
17.00