#include<bits/stdc++.h>
#define deb(x) cerr<< #x <<" = "<<x<<endl
using namespace std;
const double eps=1e-9;
int sgn(double x){return (x>eps)-(x<-eps);}
int sgn(double a,double b){return sgn(a-b);}
double sqr(double x){return x*x;}
struct P{
	double x,y;
	P(){}
	P(double x,double y):x(x),y(y){}
	double len2(){
		return sqr(x)+sqr(y);
	}
	double len(){
		return sqrt(len2());
	}
	void print(){
		printf("(%.3f,%.3f)\n",x,y);
	}
	P turn90(){return P(-y,x);}
	P norm(){return P(x/len(),y/len());}
};
bool operator==(P a,P b){
	return !sgn(a.x-b.x) and !sgn(a.y-b.y);
}
P operator+(P a,P b){
	return P(a.x+b.x,a.y+b.y);
}
P operator-(P a,P b){
	return P(a.x-b.x,a.y-b.y);
}
P operator*(P a,double b){
	return P(a.x*b,a.y*b);
}
P operator/(P a,double b){
	return P(a.x/b,a.y/b);
}
double operator^(P a,P b){
	return a.x*b.x + a.y*b.y;
}
double operator*(P a,P b){
	return a.x*b.y - a.y*b.x;
}
double det(P a,P b,P c){
	return (b-a)*(c-a);
}
double dis(P a,P b){
	return (b-a).len();
}
double Area(vector<P>poly){
	double ans=0;
	for(int i=1;i<poly.size();i++)
		ans+=(poly[i]-poly[0])*(poly[(i+1)%poly.size()]-poly[0]);
	return fabs(ans)/2;
}
struct L{
	P a,b;
	L(){}
	L(P a,P b):a(a),b(b){}
	P v(){return b-a;}
};
bool onLine(P p,L l){
	return sgn((l.a-p)*(l.b-p))==0;
}
bool onSeg(P p,L s){
	return onLine(p,s) and sgn((s.b-s.a)^(p-s.a))>=0 and sgn((s.a-s.b)^(p-s.b))>=0;
}
bool parallel(L l1,L l2){
	return sgn(l1.v()*l2.v())==0;
}
P intersect(L l1,L l2){
	double s1=det(l1.a,l1.b,l2.a);
	double s2=det(l1.a,l1.b,l2.b);
	return (l2.a*s2-l2.b*s1)/(s2-s1);
}
P project(P p,L l){
	return l.a+l.v()*((p-l.a)^l.v())/l.v().len2();
}
double dis(P p,L l){
	return fabs((p-l.a)*l.v())/l.v().len();
}
struct C{
	P o;
	double r;
	C(){}
	C(P _o,double _r):o(_o),r(_r){}
};
// ?±?????????´????????????
//turn90() P(-y,x)
double fix(double x){return sgn(x)?x:0;}
bool intersect(C a, L l, P &p1, P &p2) { 
	double x = ((l.a - a.o)^ (l.b - l.a)),
		y = (l.b - l.a).len2(),
		d = x * x - y * ((l.a - a.o).len2() - a.r * a.r);
	if (sgn(d) < 0) return false;
	d = max(d, 0.0);
	P p = l.a - ((l.b - l.a) * (x / y)), delta = (l.b - l.a) * (sqrt(d) / y);
	p1 = p + delta, p2 = p - delta;
	return true;
}
// ?±????????????????????????¨????°???¨?????????????????????
bool intersect(C a, C b, P &p1, P &p2) { 
	double s1 = (a.o - b.o).len();
	if (sgn(s1 - a.r - b.r) > 0 || sgn(s1 - fabs(a.r - b.r)) < 0) return false;
	double s2 = (a.r * a.r - b.r * b.r) / s1;
	double aa = (s1 + s2) * 0.5, bb = (s1 - s2) * 0.5;
	P o = (b.o - a.o) * (aa / (aa + bb)) + a.o;
	P delta = (b.o - a.o).norm().turn90() * sqrt(fix(a.r * a.r - aa * aa));
	p1 = o + delta, p2 = o - delta;
	return true;
}
P p[11];
int n,w;
double h[11];
C c[11];
L l[4];
bool check(double r){
	for(int i=1;i<=n;i++){
		c[i].o=p[i];
		if(h[i]-eps>=r){
			c[i].r=r;
		}else{
			c[i].r=sqrt(sqr(r)-sqr(r-h[i]));
		}
	}
	
	double d;
	if(w>=r){
		d=r;
	}else{
		d=sqrt(sqr(r)-sqr(r-w));
	}
	if(d*2+eps>=100)return false;
	static P pt[11111];
	int cnt=0;
	pt[++cnt]=P(d,d);
	pt[++cnt]=P(100-d,d);
	pt[++cnt]=P(d,100-d);
	pt[++cnt]=P(100-d,100-d);
	
	l[0]=L(P(d,d),P(100-d,d));
	l[1]=L(P(100-d,d),P(100-d,100-d));
	l[2]=L(P(100-d,100-d),P(d,100-d));
	l[3]=L(P(d,100-d),P(100-d,d));
	
	for(int i=1;i<=n;i++){
		for(int j=i+1;j<=n;j++){
			P p1,p2;
			if(intersect(c[i],c[j],p1,p2)){
				pt[++cnt]=p1;
				pt[++cnt]=p2;
			}
		}
		
		for(int j=0;j<4;j++){
			P p1,p2;
			if(intersect(c[i],l[j],p1,p2)){
				pt[++cnt]=p1;
				pt[++cnt]=p2;
			}
		}
		
	}
	for(int i=1;i<=cnt;i++){
		int flag=1;
		if(pt[i].x+eps<=d||pt[i].x-eps>=100-d||pt[i].y+eps<=d||pt[i].y-eps>=100-d)
			continue;
		//deb(i);
		//cout<<pt[i].x<<" "<<pt[i].y<<endl;
		for(int j=1;j<=n;j++){
			//deb(dis(pt[i],c[i].o));
			//deb(c[i].r);
			if(sgn(dis(pt[i],c[j].o)-c[j].r)==-1){
				flag=0;
				break;
			}
		}
		if(flag)
			return true;
	}
	return false;
}

int main(){
	while(scanf("%d%d",&n,&w)==2){
		if(!n&&!w)break;
		for(int i=1;i<=n;i++){
			scanf("%lf%lf%lf",&p[i].x,&p[i].y,&h[i]);
		}
		double l=0,r=1e9;
		int TAT=1111;
		//cout<<check(40.0)<<endl;
		//return 0;
		while(TAT--){
			double mid=(l+r)/2;
			if(check(mid))
				l=mid;
			else
				r=mid;
		}
		printf("%.10f\n",l);
	}
	return 0;
}

Measured memory_bytes: 3192