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;

#define rep(i,x,y) for(int i=(x);i<(y);++i)
#define debug(x) #x << "=" << (x)

#ifdef DEBUG
#define _GLIBCXX_DEBUG
#define print(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl
#else
#define print(x)
#endif

const int inf=1e9;
const int64_t inf64=1e18;
const long double eps=1e-6;

template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec){
    os << "[";
    for (const auto &v : vec) {
    	os << v << ",";
    }
    os << "]";
    return os;
}

//not verified
typedef complex<long double> point;
typedef pair<point,point> line;
point polar(const long double &r, const long double &th) { return point(r*cosl(th),r*sinl(th)); }
bool equal(const long double x1,const long double x2){ return abs(x1-x2)<eps; }
bool equal(const point& a,const point& b){ return equal(a.real(),b.real()) and equal(a.imag(),b.imag()); }
long double length(const point& a){ return abs(a); }
long double distance(const point& a,const point& b){ return abs(a-b); }
long double dot(const point& a,const point& b){ return a.real()*b.real()+a.imag()*b.imag(); }
long double cross(const point& a,const point& b){ return a.real()*b.imag()-a.imag()*b.real(); }
bool is_orthogonal(const point& a1,const point& a2,const point& b1,const point& b2){ return equal(dot(a1-a2,b1-b2),0.0); }
bool is_orthogonal(const line& l,const line& m){ return is_orthogonal(l.first,l.second,m.first,m.second); }
bool is_parallel(const point& a1,const point& a2,const point& b1,const point& b2){ return equal(cross(a1-a2, b1-b2),0.0); }
bool is_parallel(const line& l,const line& m){ return is_parallel(l.first,l.second,m.first,m.second); }
int ccw(point a,point b,point 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;
}
bool intersectLL(const line& l, const line& m){
    return abs(cross(l.second-l.first, m.second-m.first)) > eps || // non-parallel
           abs(cross(l.second-l.first, m.first-l.first)) < eps;   // same line
}
bool intersectLS(const line& l, const line& s){
    return cross(l.second-l.first, s.first-l.first)*       // s.first is left of l
           cross(l.second-l.first, s.second-l.first) < eps; // s.second is right of l
}
bool intersectLP(const line& l, const point& p){
    return abs(cross(l.second-p, l.first-p)) < eps;
}
bool intersectSS(const line& s, const line& t){
    return ccw(s.first,s.second,t.first)*ccw(s.first,s.second,t.second) <= 0 &&
           ccw(t.first,t.second,s.first)*ccw(t.first,t.second,s.second) <= 0;
}
bool intersectSP(const line& s, const point& p){
    return abs(s.first-p)+abs(s.second-p)-abs(s.second-s.first) < eps; // triangle inequality
}
point projection(const line& l, const point& p) {
    long double t = dot(p-l.first, l.first-l.second) / norm(l.first-l.second);
    return l.first + t*(l.first-l.second);
}
point reflection(const line& l, const point& p){
    return p+point((projection(l, p) - p).real()*2,(projection(l, p) - p).imag()*2);
}
long double distanceLP(const line &l, const point& p){
    return abs(p - projection(l, p));
}
long double distanceLL(const line &l, const line &m){
    return intersectLL(l, m) ? 0 : distanceLP(l, m.first);
}
long double distanceLS(const line &l, const line &s){
    if (intersectLS(l, s)) return 0;
    return min(distanceLP(l, s.first), distanceLP(l, s.second));
}
long double distanceSP(const line &s, const point& p) {
    const point r = projection(s, p);
    if (intersectSP(s, r)) return abs(r - p);
    return min(abs(s.first - p), abs(s.second - p));
}
long double distanceSS(const line &s, const line &t) {
    if (intersectSS(s, t)) return 0;
    return min(min(distanceSP(s, t.first), distanceSP(s, t.second)),
             min(distanceSP(t, s.first), distanceSP(t, s.second)));
}
// a1,a2???????????´?????¨b1,b2???????????´?????????????¨????
point intersection_l(const point& a1,const point& a2,const point& b1,const point& b2) {
  const point& a=a2-a1,b=b2-b1;
  return a1+a*cross(b, b1-a1)/cross(b, a);
}
point intersection_l(const line& l,const line& m){
    return intersection_l(l.first,l.second,m.first,m.second);
}

//??´??????????????????????????????????±???????
line get_unit_normalV(const point &a,const point &b){
    line l;
    l.first=((b-a)*point(0,1))/abs(b-a);
    l.second=((b-a)*point(0,-1))/abs(b-a);
    return l;
}

//??????s????????¢d?????????????§????
pair<line,line> get_translation(const line &s,long double d){
    line v = get_unit_normalV(s.first,s.second);
    pair<line,line> res;
    res.first=line(s.first+v.first*d,s.second+v.first*d);
    res.second=line(s.first+v.second*d,s.second+v.second*d);
    return res;
}

struct circle{
    point o;
    long double r;
    circle(){}
    circle(const point o,const long double r):o(o),r(r){}
};

//2??????????????????
int icc(const circle &c, const circle &d) {
    /*
      1 : intersect
      0 : distinct
      -1: c < d
      -2: c > d

      intersect or contain : true
      distinct             : false
    */
    long double od = abs((c.o-d.o));
    return c.r+d.r<od+eps ? 0 : od+c.r<d.r+eps ? -1 : od+d.r<c.r+eps ? -2 : 1;
}

//?????¨??´??????????????????
int icl(const circle &c, const line &l) {
    /*
      number of crosspoint
    */
    long double d = norm(projection(l,c.o)-c.o)-c.r*c.r;
    return d>eps ? 0 : std::abs(d)<eps ? 1 : 2;
}

//?????¨?????????????????????
int ics(const circle &c, const line &s) {
    /*
      0 : distinct
      1 : intersect 1 point
      2 : s is in c
    */
    if (!icl(c, s)) return 0;
    long double da = abs(s.first - c.o);
    long double db = abs(s.second - c.o);
    if ((da < c.r-eps) and (db < c.r-eps)) return 0;
    if ((da < c.r-eps) xor (db < c.r-eps)) return 1;
    return ccw(s.first, s.second, projection(s,c.o)) ? 0 : 2;
}

//?????¨????????????
pair<point,point> ccc(const circle &c1, const circle &c2) {
    if(!icc(c1,c2)) return pair<point,point>(c1.o,c2.o);
    long double w = abs(c2.o-c1.o), th = arg(c2.o-c1.o);
    long double dth = acosl((c1.r*c1.r+w*w-c2.r*c2.r)/(2.*c1.r*w));
    return pair<point,point>(c1.o+polar(c1.r,th-dth),c1.o+polar(c1.r,th+dth));
}

//????????´????????????
pair<point,point> ccl(const circle &c, const line &l) {
    point h = projection(l,c.o), p = sqrtl(c.r*c.r-norm(h-c.o))*(l.second-l.first)/abs(l.second-l.first);
    return pair<point,point>(h-p,h+p);
}

//????????????????????????????§????th????????´?????¨?????´????????????????????\???
line tangent(const circle &c, const long double &th) {
    point h = c.o+polar(c.r,th);
    point p = polar(c.r,th)*point(0,1);
    return line(h-p,h+p);
}

//2????????±?????\???
vector<line> common_tangent(const circle &c, const circle &d) {
    vector<line> res;
    long double dist = abs(d.o - c.o), th = arg(d.o - c.o);
    if (abs(c.r - d.r) < dist) { // outer
        long double dth = acosl((c.r - d.r) / dist);
        res.push_back(tangent(c, th - dth));
        res.push_back(tangent(c, th + dth));
    }
    if (abs(c.r + d.r) < dist) {
        long double dth = acos((c.r + d.r) / dist);
        res.push_back(tangent(c, th - dth));
        res.push_back(tangent(c, th + dth));
    }
    return res;
}

void solve(int n,long double w){
    vector<long double> x(n),y(n),h(n);
    rep(i,0,n) cin >> x[i] >> y[i] >> h[i];

    auto ok=[&](long double r){
        vector<circle> cs;
        rep(i,0,n){
            long double a;
            if(h[i]<r) a=sqrtl(2*r*h[i]-h[i]*h[i]);
            else a=r;
            cs.push_back(circle(point(x[i],y[i]),a));
        }

        vector<point> corners;
        long double k;
        if(w<r) k=sqrtl(w*(2*r-w));
        else k=r;
        corners.push_back(point(k,k));
        corners.push_back(point(k,100.-k));
        corners.push_back(point(100.-k,100.-k));
        corners.push_back(point(100.-k,k));
        vector<line> walls;
        rep(i,0,4) walls.push_back(line(corners[i],corners[(i+1)%4]));
        vector<point> ps;
        ps.push_back(point(50,50));
        rep(i,0,4){
            rep(j,i+1,4){
                if(is_parallel(walls[i],walls[j])) continue;
                ps.push_back(intersectLL(walls[i],walls[j]));
            }
        }
        rep(i,0,cs.size()){
            rep(j,0,4){
                if(icl(cs[i],walls[j])>=1){
                    auto intersectoin=ccl(cs[i],walls[j]);
                    ps.push_back(intersectoin.first);
                    ps.push_back(intersectoin.second);
                }
            }
            rep(j,i+1,cs.size()){
                if(icc(cs[i],cs[j])==1){
                    auto intersectoin=ccc(cs[i],cs[j]);
                    ps.push_back(intersectoin.first);
                    ps.push_back(intersectoin.second);
                }
            }
        }
        if(ps.empty()) return true;
        for(const point &o:ps){
            if(o.real()<k-eps or 100-k+eps<o.real() or o.imag()<k-eps or 100-k+eps<o.imag()) continue;
            bool f=true;
            rep(i,0,n){
                long double a;
                if(h[i]<r) a=h[i]*(2*r-h[i]);
                else a=r*r;
                if((x[i]-o.real())*(x[i]-o.real())+(y[i]-o.imag())*(y[i]-o.imag())<a-eps){
                    f=false;
                    break;
                }
                // if(h[i]<r) a=sqrtl(h[i]*(2*r-h[i]));
                // else a=r;
                // if(abs(point(x[i],y[i])-o)<a-eps){
                //     f=false;
                //     break;
                // }
            }
            if(!f) continue;
            return true;
        }
        return false;
    };

    long double lb=0,ub=inf64;
    rep(i,0,128){
        long double mid=(lb+ub)/2;
        if(ok(mid)) lb=mid;
        else ub=mid;
    }
    cout << lb << endl;
}

int main(){
    std::cin.tie(0);
    std::ios::sync_with_stdio(false);
    cout.setf(ios::fixed);
    cout.precision(5);
    for(;;){
        int n,w;
        cin >> n >> w;
        if(!n and !w) break;
        solve(n,w);
    }
    return 0;
}