#include <algorithm>
#include <numeric>
#include <map>
#include <vector>
#include <cmath>
#include <iostream>
#include <queue>
#include <tuple>
#include <set>
#include <complex>
#include <iomanip>

using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;i++)

typedef long double D;
const D INF = 1e12, EPS = 1e-10;

typedef complex<D> P;

#define X real()
#define Y imag()

struct L : public vector<P> {
  P vec() const {return this->at(1)-this->at(0);}
  L(const P &a, const P &b) {push_back(a); push_back(b);}
  L(){push_back(P()); push_back(P());}
};

struct C {
  P o; D r;
  C(const P &o, D r) : o(o), r(r) {}
};

istream& operator >> (istream& is, complex<D> & p) {D x,y; is >> x >> y; p=P(x,y); return is;}

int sig(D a, D b=0) {return a<b-EPS?-1:a>b+EPS?1:0;}
template<typename T> bool eq(const T& a, const T& b){return sig(abs(a-b)) ==0;}
bool compX (const P& a, const P& b) {return !eq(a.X, b.X)?sig(a.X,b.X)<0:sig(a.Y,b.Y)<0;}

D cross(const P& a, const P& b) {return imag(conj(a)*b);}
D dot(const P& a, const P& b) {return real(conj(a)*b);}
int ccw(const P& a, P b, P c) {
  b -= a; c -= a;
  if (sig(cross(b,c)) > 0) return +1;
  if (sig(cross(b,c)) < 0) return -1;
  if (sig(dot(b,c)) < 0) return +2;
  if (sig(norm(b), norm(c)) < 0) return -2;
  return 0;
}

enum RELATION{INCOMPARABLE=0, SAME=1, CONTAIN=2, OVER=4};
pair<RELATION, int> cRel(const C& c1, const C& c2) {
  D d = abs(c1.o-c2.o);
  if (eq(c1.o,c2.o) && eq(c1.r,c2.r)) return make_pair(SAME, 1<<28);
  if (sig(d, c1.r-c2.r)<0) return make_pair(OVER,0);
  if (sig(d, c2.r-c1.r)<0) return make_pair(CONTAIN,0);
  if (sig(d, c1.r-c2.r)==0) return make_pair(OVER,0);
  if (sig(d, c2.r-c1.r)==0) return make_pair(CONTAIN,1);
  if (sig(d, c1.r+c2.r)==0) return make_pair(INCOMPARABLE,1);
  if (sig(d, c1.r+c2.r)<0) return make_pair(INCOMPARABLE,2);
  return make_pair(INCOMPARABLE, 0);
}

vector<P> intersectionCC(const C& c1, const C& c2) {
  pair<RELATION,int> rel = cRel(c1, c2);
  D d = abs(c2.o-c1.o);
  P diff=(c2.o-c1.o) / d;
  vector<P> res;
  if (rel.second == 1) {
	res.push_back(c1.o+diff*c1.r);
  } else if (rel.second==2) {
	double rc = (d*d + c1.r*c1.r - c2.r*c2.r) / (2*d);
	double rs = sqrt(c1.r*c1.r - rc*rc);
	res.push_back(c1.o+diff*P(rc,rs));
	res.push_back(c1.o+diff*P(rc,-rs));
  }
  return res;
}

P projection(const L &l, const P &p) {
  D t = dot(p-l[0], l.vec()) / norm(l.vec());
  return l[0] + t * l.vec();
}

D distanceLP(const L &l, const P &p) {return abs(p - projection(l, p));}

vector<P> intersectionLC(L l, C c) {
  D d = distanceLP(l, c.o);
  vector<P> res;
  if (sig(d-c.r) == 0) {
	res.push_back(projection(l, c.o));
  } else if (sig(d, c.r)< 0) {
	P m = projection(l, c.o), u = (l[1]-l[0])/abs(l[1]-l[0]);
	D t = sqrt(c.r*c.r - d*d);
	res.push_back(m + t*u); res.push_back(m-t*u);
  }
  return res;
}

vector<P> intersectionSC(L l, C c) {
  vector<P> ps = intersectionLC(l,c), res;
  for (int i = 0; i < (int)ps.size(); i++) {
	if (ccw(ps[i],l[0],l[1]) == +2 || ccw(ps[i],l[1], l[0]) == +2) {
	  res.push_back(ps[i]);
	}
  }
  return res;
}

D getH(D r, D h) {
	if(sig(r,h)<0)return r;
	return sqrt(norm(r) - norm(r-h));
}

vector<D> h(10);
vector<P> cent(10);
int n; D w;
bool calc(D mid) {
	D m = getH(mid, w);
	if (sig(m,50)>0) return false;
	
	vector<C> circles;REP(i,n) circles.push_back(C(cent[i], getH(mid, h[i])));
	//交点列挙
	vector<P> ps; 
	//円と円
	REP(i,n)REP(j,n)if(i!=j){
		vector<P> is = intersectionCC(circles[i], circles[j]);
		REP(k,is.size())ps.push_back(is[k]);
	}
	//線と線
	ps.push_back(P(m,m));ps.push_back(P(m,100-m));
	ps.push_back(P(100-m,m));ps.push_back(P(100-m,100-m));

	vector<L> ss;
	ss.push_back(L(P(m, m), P(m, 100-m)));ss.push_back(L(P(m, m), P(100-m, m)));
	ss.push_back(L(P(m, 100-m), P(100-m, 100-m)));ss.push_back(L(P(100-m, m), P(100-m, 100-m)));

	//線と円
	REP(i,n)REP(j,4){
		vector<P> is = intersectionSC(ss[j], circles[i]);
		REP(k,is.size())ps.push_back(is[k]);
	}
	//inner check
	REP(i,ps.size())if(sig(m,ps[i].X)<=0 && sig(ps[i].X,100-m)<=0 &&  sig(m,ps[i].Y)<=0 && sig(ps[i].Y,100-m)<=0){
		bool ok=true;
		REP(j,n)if(sig(abs(ps[i]-circles[j].o),circles[j].r)<0)ok=false;
		if(ok)return ok;
	}
	return false;
}

int main() {
	cout <<fixed <<setprecision(20);
	cerr <<fixed <<setprecision(20);
  while (true) {
	cin >> n >> w;
	if (n == 0 && w == 0) break;
	for (int i = 0; i < n; i++) {
	  cin >> cent[i] >> h[i];
	}

	D lb = 0.0, ub = 100000000.0;
	for (int z = 0; z < 100; z++) {
	  D mid = (lb + ub) / 2;
	  if (calc(mid)) {
		lb = mid;
	  } else {
		ub = mid;
	  }
	}
	cout << lb << endl;
  }
}

Measured memory_bytes: 1332