Golden Spire
There are some peculiar facts known about bacterium ?Jandelinka Fest?, which inhabits the Jandal region. When a strain of this bacteria is exposed to air, it starts propagating uniformly in all directions so that the boundary of its population is an ideal sphere centered in the initial place of the strain habitation. The radius of the sphere is linearly increasing over time.
Moreover, bacteria do not tolerate the scent of certain aroma, so if being smoked they immediately die.
This property is often used by the local ministers of religion. They decorate the temples with golden spires of fanciful forms as follows. An ideally straight thin vertical stick is set up on a flat horizontal ground surface. Some points of the stick are covered by bacteria strains (different strains are placed in different points). As different colonies may be of different bacteria species, they may have different rates of propagation. After a week monks stop the process by smoking the stick, and cover the resulting construction by golden dust. Then the spire is set up on a peak of a temple.
The spheres corresponding to distinct colonies may collide but the species are completely indifferent to each other. Hence, a point is covered by the colonies if and only if it is contained in any of the above spheres (all growing independently). Also, when bacteria reach the ground level (corresponding to zero height) they die immediately.
You are asked to find total area of the spire surface treating the stick as an ideal line. The reason is monks should estimate the amount of gold needed to finish the spire. Only spherical parts of the surface should be counted.
Input
The first line contains an integer M - the number of colonies (1 ≤ M ≤ 2000). The next M lines contain two single space separated real numbers each. The first (H_i) defines the height of the colony over the surface (given in feet). The second (V_i) defines the rate of propagation (the speed at which the radius increases, in inches per hour).
0 ≤ H_i ≤ 1000, 0 ≤ V_i ≤ 10.
Output
The only line of the output should contain the total area of the spherical parts of the surface, in square feet. Your answer must be given truncated to five decimal places.