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

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
using ld = long double;
//
//const ld EPS = 1e-12;
//const ld eps = 1e-12;
//const ld INF = 1e12;
//typedef complex<ld> P;
//namespace std{
//	bool operator < (const P& a, const P& b){
//		return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
//	}
//}
//ld cross(const P& a, const P& b){
//	return imag(conj(a)*b);
//}
//ld dot(const P& a, const P& b){
//	return real(conj(a)*b);
//}
//
//struct L : public std::vector<P>{
//	L(const P &a = P(), const P &b = P()) : std::vector<P>(2){
//		begin()[0] = a;
//		begin()[1] = b;
//	}
//
//	// Ax + By + C = 0
//	L(ld A, ld B, ld C){
//		if(std::abs(A) < eps && std::abs(B) < eps){
//			abort();
//		}
//		else if(std::abs(A) < eps){
//			*this = L(P(0, -C / B), P(1, -C / B));
//		}
//		else if(std::abs(B) < eps){
//			*this = L(P(-C / A, 0), P(-C / A, 1));
//		}
//		else{
//			*this = L(P(0, -C / B), P(-C / A, 0));
//		}
//	}
//};
//
//struct C{
//	P p; ld r;
//	C(const P &p, ld r) : p(p), r(r){}
//};
//
//int ccw(P a, P b, P c){
//	b -= a; c -= a;
//	if(cross(b, c) > 0)   return +1;       // counter clockwise
//	if(cross(b, c) < 0)   return -1;       // clockwise
//	if(dot(b, c) < 0)     return +2;       // c--a--b on line
//	if(norm(b) < norm(c)) return -2;       // a--b--c on line
//	return 0;
//}
//
//P projection(const L &l, const P &p){
//	ld t = dot(p - l[0], l[0] - l[1]) / norm(l[0] - l[1]);
//	return l[0] + t*(l[0] - l[1]);
//}
//P reflection(const L &l, const P &p){
//	return p + ld(2.0) * (projection(l, p) - p);
//}
//
//ld distanceLP(const L &l, const P &p){
//	return abs(p - projection(l, p));
//}
//
//std::vector<P> crosspointCL(const C &c, const L &l){
//	std::vector<P> res;
//	ld d = distanceLP(l, c.p);      // ????????¨??´???????????¢
//	if(std::abs(d - c.r) < eps){  // ?§?????????????
//		res.push_back(projection(l, c.p));
//		return res;
//	}
//	if(d > c.r) return res;  // ??¢????????????
//	P h = projection(l, c.p);
//	P u = std::sqrt(c.r * c.r - d * d) * (l[1] - l[0]) / std::abs(l[1] - l[0]);
//	res.push_back(h + u);
//	res.push_back(h - u);
//	return res;
//}
//
//int intersectCC(const C &c1, const C &c2){
//	ld d = std::abs(c1.p - c2.p), r1 = c1.r, r2 = c2.r;
//	if(r1 + r2 < d) return 0;                   // ??¢????????????
//	if(std::abs(r1 + r2 - d) < eps) return -2;  // ?????\
//	if(std::abs(d + r1 - r2) < eps) return +1;  // c1 ??? c2 ????????§?????\
//	if(std::abs(d + r2 - r1) < eps) return -1;  // c2 ??? c1 ????????§?????\
//	if(d + r1 < r2) return +3;                  // c1 ??? c2 ??????
//	if(d + r2 < r1) return -3;                  // c2 ??? c1 ??????
//	return 2;                                    // 2?????????????????????
//}
//
//
//std::vector<P> crosspointCC(const C &c1, const C &c2){
//	std::vector<P> res;
//	ld r1 = c1.r, r2 = c2.r, d = std::abs(c1.p - c2.p);
//	if(std::abs(c1.p - c2.p) < 0) return res;  // ???????????????
//	int i = intersectCC(c1, c2);
//	if(i == +1 || i == -1){  // ?????\
//		if(r2 < r1)
//			res.push_back(c1.p + r1 / d * (c2.p - c1.p));
//		else
//			res.push_back(c2.p + r2 / d * (c1.p - c2.p));
//		return res;
//	}
//	if(i == -2){  // ?????\
//		res.push_back((c1.p * c1.r + c2.p * c2.r) / (c1.r + c2.r));
//		return res;
//	}
//	if(i == 0 || i == +3 || i == -3){  // ??±?????¨????????? || ?????¨
//		return res;
//	}
//	// 2?????????????????????
//	P p = c1.p - c2.p;
//	ld A = -2. * p.real(), B = 2 * p.imag();
//	ld C = norm(c1.p) - norm(c2.p) - r1 * r1 + r2 * r2;
//	return crosspointCL(c1, L(A, B, C));  // Ax + By + C = 0
//}

int N;
ld W;

ld X[10];
ld Y[10];
ld H[10];

ld d(ld r, ld h){
	if(r <= h) return r;
	return sqrt(2.0 * r * h - h * h);
}

//bool check(ld r){
//	ld dw = d(r, W);
//	ld LL = dw, RR = 100 - dw;
//	if(LL >= RR) return false;
//
//	vector<C> cs;
//	for(int i = 0; i < N; i++){
//		cs.push_back(C(P(X[i], Y[i]), d(r, H[i])));
//	}
//	vector<P> ps;
//	ps.push_back(P(LL, LL));
//	ps.push_back(P(RR, LL));
//	ps.push_back(P(RR, RR));
//	ps.push_back(P(LL, RR));
//	for(int i = 0; i < N; i++){
//		for(int j = 0; j < 4; j++){
//			auto pp = crosspointCL(cs[i], L(ps[j], ps[(j + 1) % 4]));
//			for(auto p : pp){
//				ps.push_back(p);
//			}
//		}
//		for(int j = i + 1; j < N; j++){
//			auto pp = crosspointCC(cs[i], cs[j]);
//			for(auto p : pp){
//				ps.push_back(p);
//			}
//		}
//	}
//	for(int i = 0; i < ps.size(); i++){
//		P p = ps[i];
//		if(!(LL - eps <= p.real() && p.real() <= RR + eps)) continue;
//		if(!(LL - eps <= p.imag() && p.imag() <= RR + eps)) continue;
//		bool ok = true;
//		for(int j = 0; j < cs.size(); j++){
//			ld dist = abs(p - cs[j].p);
//			if(dist <= cs[j].r - eps){
//				ok = false;
//				break;
//			}
//		}
//		if(ok) return true;
//	}
//	return false;
//}

#define pb push_back
#define fs first
#define sc second
typedef long double D;
typedef complex<D> P;
typedef pair<P, P> L;
typedef vector<P> Pol;
struct C{ P p; D r; };
D eps = 1e-9;
bool eq(D a, D b){ return abs(a - b) < eps; }
int large(D a, D b){ return eq(a, b) ? 0 : (a > b ? 1 : -1); }
bool containCC(C a, C b){
	return abs(a.p - b.p) + b.r < a.r + eps;
}
D dot(P a, P b){ return real(conj(a)*b); }
P perp(L l, P p){
	D t = dot(p - l.fs, l.fs - l.sc) / norm(l.fs - l.sc);
	return l.fs + t*(l.fs - l.sc);
}
D dLP(L l, P p){ return abs(perp(l, p) - p); }
Pol intCC(C a, C b){
	int x = large(abs(a.p - b.p), a.r + b.r);
	Pol ret;
	if(x == 1) return ret;
	if(x == 0){
		ret.pb((a.r*b.p + b.r*a.p) / (a.r + b.r));
		return ret;
	}
	if(containCC(a, b) || containCC(b, a)) return ret;
	D d = abs(a.p - b.p);
	D theta = acos((a.r*a.r + d*d - b.r*b.r) / (2.0*a.r*d));
	ret.pb(a.p + (b.p - a.p) / d*polar(a.r, theta));
	ret.pb(a.p + (b.p - a.p) / d*polar(a.r, -theta));
	return ret;
}
Pol intCL(C c, L l){
	int x = large(dLP(l, c.p), c.r);
	Pol ret;
	if(x == 1) return ret;
	if(x == 0){
		ret.pb(perp(l, c.p));
		return ret;
	}
	D d = dLP(l, c.p);
	if(d < eps){
		ret.pb(c.p + (l.fs - l.sc) / abs(l.fs - l.sc)*c.r);
		ret.pb(c.p - (l.fs - l.sc) / abs(l.fs - l.sc)*c.r);
		return ret;
	}
	D theta = acos(d / c.r);
	P p = perp(l, c.p);
	ret.pb(c.p + (p - c.p) / d*polar(c.r, theta));
	ret.pb(c.p + (p - c.p) / d*polar(c.r, -theta));
	return ret;
}

bool check(ld r){
	ld dw = d(r, W);
	ld LL = dw, RR = 100 - dw;
	if(LL >= RR) return false;

	vector<C> cs;
	for(int i = 0; i < N; i++){
		cs.push_back({ P(X[i], Y[i]), d(r, H[i]) });
	}
	vector<P> ps;
	ps.push_back(P(LL, LL));
	ps.push_back(P(RR, LL));
	ps.push_back(P(RR, RR));
	ps.push_back(P(LL, RR));
	for(int i = 0; i < N; i++){
		for(int j = 0; j < 4; j++){
			auto pp = intCL(cs[i], L(ps[j], ps[(j + 1) % 4]));
			for(auto p : pp){
				ps.push_back(p);
			}
		}
		for(int j = i + 1; j < N; j++){
			auto pp = intCC(cs[i], cs[j]);
			for(auto p : pp){
				ps.push_back(p);
			}
		}
	}
	for(int i = 0; i < ps.size(); i++){
		P p = ps[i];
		if(!(LL - eps <= p.real() && p.real() <= RR + eps)) continue;
		if(!(LL - eps <= p.imag() && p.imag() <= RR + eps)) continue;
		bool ok = true;
		for(int j = 0; j < cs.size(); j++){
			ld dist = abs(p - cs[j].p);
			if(dist <= cs[j].r - eps){
				ok = false;
				break;
			}
		}
		if(ok) return true;
	}
	return false;
}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
#ifdef LOCAL
	std::ifstream in("in");
	std::cin.rdbuf(in.rdbuf());
#endif

	while(cin >> N >> W, N){
		for(int i = 0; i < N; i++){
			cin >> X[i] >> Y[i] >> H[i];
		}

		ld ok = 0, ng = 1e5;
		for(int i = 0; i < 300; i++){
			ld mid = (ng + ok) / 2;
			if(check(mid)) ok = mid;
			else ng = mid;
		}

		cout << fixed << setprecision(10) << ok << endl;
	}
}