Selling Cells

Time limit2sMemory limit128 MB

Problem

Competition has been fierce among the cellphone providers in the town of Eastern WestField. Several companies each claim in their ads to provide more coverage to the town than any of their competitors.

AetherTech Telecommunications suspects that they really do cover a larger portion of the town than their competitors, and they would like to compute their actual coverage so that they can advertise the true amount.

The metropolitan area of Eastern WestField is modeled as a circle around the town center. The area covered by each cell tower is also modeled as a circle, centered on the location of the tower, indicating the region within which the tower provides enough signal strength for a phone to connect.

Every cell tower has its center within the metropolitan area, although its coverage may extend beyond the border of the metropolitan area. The areas covered by different towers may overlap; however, for economic reasons no two towers are built so close together that the center of one lies within the coverage area of the other.

Compute the fraction of the metropolitan area within which a cell phone would be covered by at least one tower.

Input

The input consists of multiple data sets. Each data set begins with a line containing a single integer $N$ ($1 \le N \le 25$). This line is followed by $N$ lines, each containing three floating-point numbers $x$, $y$, $r$: the coordinates $(x, y)$ of a circle's center and its radius $r$.

The first circle in the list denotes the metropolitan area of Eastern WestField. Each of the remaining $N-1$ circles describes a cell tower.

The final data set is followed by a line containing a single $0$.

Output

For each data set, compute the fraction of the metropolitan area covered by at least one cell tower and print it on its own line as a real number in the range $0.00$ to $1.00$, rounded to two decimal places.