#include <cstdio>
#include <vector>
#include <complex>
#include <cmath>
using namespace std;

typedef double D;
typedef complex<D> P;
typedef const P &rP;

const D EPS = 1e-10;

D dot(rP a, rP b){
	return real(a) * real(b) + imag(a) * imag(b);
}

void intrcc(rP p1, D r1, rP p2, D r2, vector<P> &res){
	D d = abs(p2 - p1);
	D phi = arg(p2 - p1);
	D costheta = (d * d + r1 * r1 - r2 * r2) / (2.0 * d * r1);
	if( abs(costheta) > 1.0 ){	return;	}
	D theta = acos(costheta);
	res.push_back(p1 + polar(r1, phi + theta));
	res.push_back(p1 + polar(r1, phi - theta));
}

void intrlc(rP p1, rP p2, rP pc, D r, vector<P> &res){
	P v12 = p2 - p1;
	P v1c = pc - p1;

	D a = norm(v12);
	D b = -dot(v12, v1c);
	D c = norm(v1c) - r * r;

	D d = b * b - a * c;
	if(abs(a) < EPS || d < EPS){
		return;
	}
	d = sqrt(d);
	D t1 = (-b + d) / a;
	D t2 = (-b - d) / a;
	res.push_back(p1 + v12 * t1);
	res.push_back(p1 + v12 * t2);
}

D rtod(D h, D r){
	if(r <= h){ return r; }
	D th = asin((r - h) / r);
	return r * cos(th);
}

vector<P> ps;
vector<D> hs;
vector<D> ds;
D wl;

bool check(D r){
	D lx = rtod(wl, r);
	D rx = 100.0 - lx;
	
	P fld[4];
	fld[0] = P(lx, lx);
	fld[1] = P(lx, rx);
	fld[2] = P(rx, rx);
	fld[3] = P(rx, lx);
	
	vector<P> cand(fld, fld + 4);

	ds.resize(hs.size());
	for(size_t i = 0; i < hs.size(); ++i){
		ds[i] = rtod(hs[i], r);
	}
	
	for(size_t i = 0; i < hs.size(); ++i){
		for(int j = 0; j < 4; ++j){
			intrlc(fld[j], fld[(j + 1) & 3], ps[i], ds[i], cand);
		}
		for(size_t j = 0; j < i; ++j){
			intrcc(ps[i], ds[i], ps[j], ds[j], cand);
		}
	}
	
	for(size_t i = 0; i < cand.size(); ++i){
		D x = real(cand[i]), y = imag(cand[i]);
		if(x > lx - EPS && x < rx + EPS && y > lx - EPS && y < rx + EPS){
			bool ok = true;
			for(size_t j = 0; j < ds.size(); ++j){
				if(abs(cand[i] - ps[j]) < ds[j] - EPS){
					ok = false;
					break;
				}
			}
			if(ok){
				return true;
			}
		}
	}
	return false;
}

int main(){
	int n;
	D x, y;
	while(scanf("%d%lf", &n, &wl), n){
		ps.resize(n);
		hs.resize(n);
		for(int i = 0; i < n; ++i){
			scanf("%lf%lf%lf", &x, &y, &hs[i]);
			ps[i] = P(x, y);
		}
		
		D left = 0.0, right = 200.0;
		for(int ttt = 200; ttt--; ){
			D mid = (left + right) * 0.5;
			if(check(mid)){
				left = mid;
			}
			else{
				right = mid;
			}
		}
		printf("%.9f\n", left);
	}
}
### Prompt

In CPP, your task is to solve the following problem:

An open-top box having a square bottom is placed on the floor. You see a number of needles vertically planted on its bottom.

You want to place a largest possible spheric balloon touching the box bottom, interfering with none of the side walls nor the needles.

Java Specific: Submitted Java programs may not use "java.awt.geom.Area". You may use it for your debugging purposes.

Figure H.1 shows an example of a box with needles and the corresponding largest spheric balloon. It corresponds to the first dataset of the sample input below.

<image>
Figure H.1. The upper shows an example layout and the lower shows the largest spheric balloon that can be placed.



Input

The input is a sequence of datasets. Each dataset is formatted as follows.


n w
x1 y1 h1
:
xn yn hn


The first line of a dataset contains two positive integers, n and w, separated by a space. n represents the number of needles, and w represents the height of the side walls.

The bottom of the box is a 100 × 100 square. The corners of the bottom face are placed at positions (0, 0, 0), (0, 100, 0), (100, 100, 0), and (100, 0, 0).

Each of the n lines following the first line contains three integers, xi, yi, and hi. (xi, yi, 0) and hi represent the base position and the height of the i-th needle. No two needles stand at the same position.

You can assume that 1 ≤ n ≤ 10, 10 ≤ w ≤ 200, 0 < xi < 100, 0 < yi < 100 and 1 ≤ hi ≤ 200. You can ignore the thicknesses of the needles and the walls.

The end of the input is indicated by a line of two zeros. The number of datasets does not exceed 1000.

Output

For each dataset, output a single line containing the maximum radius of a balloon that can touch the bottom of the box without interfering with the side walls or the needles. The output should not contain an error greater than 0.0001.

Example

Input

5 16
70 66 40
38 52 20
40 35 10
70 30 10
20 60 10
1 100
54 75 200
1 10
90 10 1
1 11
54 75 200
3 10
53 60 1
61 38 1
45 48 1
4 10
20 20 10
20 80 10
80 20 10
80 80 10
0 0


Output

26.00000
39.00000
130.00000
49.49777
85.00000
95.00000

### Response

```cpp
#include <cstdio>
#include <vector>
#include <complex>
#include <cmath>
using namespace std;

typedef double D;
typedef complex<D> P;
typedef const P &rP;

const D EPS = 1e-10;

D dot(rP a, rP b){
	return real(a) * real(b) + imag(a) * imag(b);
}

void intrcc(rP p1, D r1, rP p2, D r2, vector<P> &res){
	D d = abs(p2 - p1);
	D phi = arg(p2 - p1);
	D costheta = (d * d + r1 * r1 - r2 * r2) / (2.0 * d * r1);
	if( abs(costheta) > 1.0 ){	return;	}
	D theta = acos(costheta);
	res.push_back(p1 + polar(r1, phi + theta));
	res.push_back(p1 + polar(r1, phi - theta));
}

void intrlc(rP p1, rP p2, rP pc, D r, vector<P> &res){
	P v12 = p2 - p1;
	P v1c = pc - p1;

	D a = norm(v12);
	D b = -dot(v12, v1c);
	D c = norm(v1c) - r * r;

	D d = b * b - a * c;
	if(abs(a) < EPS || d < EPS){
		return;
	}
	d = sqrt(d);
	D t1 = (-b + d) / a;
	D t2 = (-b - d) / a;
	res.push_back(p1 + v12 * t1);
	res.push_back(p1 + v12 * t2);
}

D rtod(D h, D r){
	if(r <= h){ return r; }
	D th = asin((r - h) / r);
	return r * cos(th);
}

vector<P> ps;
vector<D> hs;
vector<D> ds;
D wl;

bool check(D r){
	D lx = rtod(wl, r);
	D rx = 100.0 - lx;
	
	P fld[4];
	fld[0] = P(lx, lx);
	fld[1] = P(lx, rx);
	fld[2] = P(rx, rx);
	fld[3] = P(rx, lx);
	
	vector<P> cand(fld, fld + 4);

	ds.resize(hs.size());
	for(size_t i = 0; i < hs.size(); ++i){
		ds[i] = rtod(hs[i], r);
	}
	
	for(size_t i = 0; i < hs.size(); ++i){
		for(int j = 0; j < 4; ++j){
			intrlc(fld[j], fld[(j + 1) & 3], ps[i], ds[i], cand);
		}
		for(size_t j = 0; j < i; ++j){
			intrcc(ps[i], ds[i], ps[j], ds[j], cand);
		}
	}
	
	for(size_t i = 0; i < cand.size(); ++i){
		D x = real(cand[i]), y = imag(cand[i]);
		if(x > lx - EPS && x < rx + EPS && y > lx - EPS && y < rx + EPS){
			bool ok = true;
			for(size_t j = 0; j < ds.size(); ++j){
				if(abs(cand[i] - ps[j]) < ds[j] - EPS){
					ok = false;
					break;
				}
			}
			if(ok){
				return true;
			}
		}
	}
	return false;
}

int main(){
	int n;
	D x, y;
	while(scanf("%d%lf", &n, &wl), n){
		ps.resize(n);
		hs.resize(n);
		for(int i = 0; i < n; ++i){
			scanf("%lf%lf%lf", &x, &y, &hs[i]);
			ps[i] = P(x, y);
		}
		
		D left = 0.0, right = 200.0;
		for(int ttt = 200; ttt--; ){
			D mid = (left + right) * 0.5;
			if(check(mid)){
				left = mid;
			}
			else{
				right = mid;
			}
		}
		printf("%.9f\n", left);
	}
}
```