#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;*/

	if(d < eps){
		res.push_back(c.p + (l[0] - l[1]) / abs(l[0] - l[1])*c.r);
		res.push_back(c.p - (l[0] - l[1]) / abs(l[0] - l[1])*c.r);
		return res;
	}
	ld theta = acos(d / c.r);
	P p = projection(l, c.p);
	res.push_back(c.p + (p - c.p) / d*polar(c.r, theta));
	res.push_back(c.p + (p - c.p) / d*polar(c.r, -theta));
	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.r * c2.p + c2.r * c1.p) / (c1.r + c2.r));//!!!!
		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

	ld theta = acos((c1.r * c1.r + d * d - c2.r * c2.r) / (2.0 * c1.r * d));
	res.push_back(c1.p + (c2.p - c1.p) / d * polar(c1.r, theta));
	res.push_back(c1.p + (c2.p - c1.p) / d * polar(c1.r, -theta));
	return res;
}

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({ 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;
}

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 < 200; i++){
			ld mid = (ng + ok) / 2;
			if(check(mid)) ok = mid;
			else ng = mid;
		}

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

Measured memory_bytes: 3468