Range

No attempts yetTime limit1sMemory limit128 MB

Problem

Some automobiles display the estimated driving range — the distance you can expect to drive (without adding fuel) before running out of fuel. Here is how it works: periodically, the vehicle's computer records the odometer reading and the weight of the fuel in the tank. From this data, the fuel consumption over a certain distance can be computed. From the fuel consumption and the most recent measurement of the fuel-tank contents (which we treat as current for all practical purposes), the range can be calculated.

Intervals over which the amount of fuel increased (fuel was added to the tank) are not used in the computation. For example, in the first instance, the interval where the fuel weight increased from 29.9 kilograms to 34.2 kilograms is not used. In this example, 16.3 kilograms of fuel were consumed over a distance of 228.6 kilometers. Therefore, the most recently measured fuel contents of 31.2 kilograms will let you drive another 438 kilometers (rounded to the nearest integer). The input always contains at least one interval (two consecutive lines) where no fuel was added to the tank.

Input

The input contains several problem instances. Each instance consists of three or more (odometer reading, fuel weight) pairs, one pair per line. Distances are measured in kilometers and fuel weight in kilograms, and every number is given to one decimal place.

The end of each instance is signaled by a $(0.0, 0.0)$ pair. The last instance is followed by a $(-1.0, -1.0)$ pair.

Output

For each instance, print the range, rounded to the nearest integer, on its own line.