You are given a set $C$ of circles with various radii placed at various positions on the plane; the circles may overlap one another. If a circle of radius $r$ is placed at a suitable position and $r$ is large enough, that circle can completely enclose every circle in $C$.
There may be more than one position at which a circle of radius $r$ encloses all circles of $C$. Let $U$ be the union of the areas covered by the enclosing circles over all such positions. In other words, for every point in $U$ there exists at least one circle of radius $r$ that encloses both that point and every circle of $C$. Your task is to compute the length of the boundary of region $U$.
Figure I.1 shows an example of the set $C$ and the region $U$. The three solid circles belong to $C$, the dashed circles show some of the possible positions of the enclosing circle, and the thick dashed closed curve bounds the region $U$.

Figure I.1: Example of the Circle Set
The input is a sequence of datasets. The number of datasets is less than $100$. Each dataset has the following format.
n r
x1 y1 r1
x2 y2 r2
...
xn yn rn
The first line of a dataset contains two positive integers $n$ and $r$ separated by a single space. $n$ is the number of circles in $C$ and does not exceed $100$; $r$ is the radius of the enclosing circle and does not exceed $1000$.
Each of the following $n$ lines contains three integers separated by single spaces. $(x_i, y_i)$ is the center of the $i$-th circle of $C$ and $r_i$ is its radius. You may assume $-500 \le x_i \le 500$, $-500 \le y_i \le 500$, and $1 \le r_i \le 500$.
The end of the input is indicated by a line containing two zeros separated by a single space.
For each dataset, output on one line the length of the boundary of region $U$, rounded to exactly two digits after the decimal point (for example, 81.68). If $r$ is too small to enclose every circle in $C$ (that is, no valid position exists), output a line containing only 0.00. Output nothing else.
The inputs are chosen so that the rounded value is unambiguous.

Figure I.2: An illustration of the last dataset