Leaps Tall Buildings (in a Single Bound)

Time limit1sMemory limit128 MB

Problem

It's a bird! It's a plane! It's coming right at us!

Although it sometimes seems otherwise, Superman cannot fly (without a plane). Instead he makes super-human leaps, especially over tall buildings. Since he never knows when he will have to catch a criminal, he cannot register flight paths; and to avoid colliding with planes he keeps every jump as low to the ground as he can.

A leap begins and ends at ground level, so Superman's trajectory is a parabola that is symmetric about the midpoint of the leap: under a downward gravitational acceleration $a$ and an initial vertical velocity $v$, his height after $t$ seconds is $d(t) = v,t + \tfrac{1}{2},a,t^2$. Given a city-scape, determine the smallest possible peak altitude (the maximum height Superman reaches during the leap) for which he still clears every building.

Input

The input consists of one or more city-scapes, each given as

n
0 d1
h2 d2
...
h(n-1) d(n-1)
0 dn

The leap starts and ends at ground level and covers a total horizontal distance of $d_1 + d_2 + \cdots + d_n$ metres. Segment $i$ has width $d_i$; the first and last segments are open ground (height $0$), and each interior segment $i$ is a building of height $h_i$ that Superman must clear over its entire width. Heights and widths may be non-integers. $n$ is at most $100$. Process city-scapes until the end of input.

Output

For each city-scape, print on its own line the minimum possible peak altitude - the smallest maximum height Superman can reach while still clearing every building - rounded to exactly two decimal places.

Hint