#include <cstdio>
#include <complex>
#include <utility>
#include <vector>
#include <algorithm>

using namespace std;

typedef complex<double> point_t;
typedef pair<point_t,double> circle_t;

const double eps=1e-9;

circle_t cs[62];
point_t meats[62];
double hardness[62];

int N,K;

void add_intersect(const circle_t & c1,const circle_t & c2,vector<point_t> & v){
    auto d=abs(c1.first-c2.first);
    auto rc=(d*d+c1.second*c1.second-c2.second*c2.second)/(2*d);
    auto diff=c1.second*c1.second-rc*rc;

    if (abs(diff)<eps) diff=0.;

    if (diff<0.) return;
    auto rs=sqrt(diff);

    auto dir=(c2.first-c1.first)/d;

    if (diff==0.) v.push_back(c1.first+diff*point_t(rc,rs));
    else {
        v.push_back(c1.first+diff*point_t(rc,rs));
        v.push_back(c1.first+diff*point_t(rc,-rs));
    }
}

vector<point_t> is_cc(circle_t c1, circle_t c2) {
	vector<point_t> res;
	auto d = abs(c1.first - c2.first);
	auto rc = (d*d + c1.second*c1.second - c2.second*c2.second) / (2 * d);
	auto dfr = c1.second*c1.second - rc * rc;
	if (abs(dfr) < eps)dfr = 0.0;
	if (dfr < 0.0)return res;
	auto rs = sqrt(dfr);
	auto diff = (c2.first - c1.first) / d;
	res.push_back(c1.first + diff * point_t(rc, rs));
	if (dfr != 0.0)res.push_back(c1.first + diff * point_t(rc, -rs));
	return res;
}

int cnt(const point_t &  p){
    int ret=0;

    for(int i=1;i<=N;i++){
        // printf("r=%lf\n",cs[i].second);
        auto dist=abs(cs[i].first-p);
        // printf("dist=%lf\n",dist);
        if (dist < cs[i].second + eps) ret++;
    }
    // printf("pos=%lf,%lf ret=%d\n",p.real(),p.imag(),ret);
    return ret;
}

bool valid(){
    vector<point_t> candidate;
    for(int i=1;i<=N;i++) candidate.push_back(meats[i]);

    for(int i=1;i<=N;i++)
        for(int j=i+1;j<=N;j++){
            auto m=is_cc(cs[i],cs[j]);
            for(auto p: m) candidate.push_back(p);
        }
            // add_intersect(cs[i],cs[j],candidate);

    // for(auto &p:candidate) printf("pos=%lf %lf\n",p.real(),p.imag());

    for(auto &p:candidate) if (cnt(p)>=K) return true;

    return false;
}

int main(){
    scanf("%d%d",&N,&K);
    for(int i=1;i<=N;i++){
        double x,y,c;
        scanf("%lf%lf%lf",&x,&y,&c);
        meats[i]=point_t(x,y);
        hardness[i]=c;

        // printf("pos=%lf %lf\n",meats[i].real(),meats[i].imag());
    }
    
    double l=0.0,r=1e6;
    double ans=r;
    for(int i=1;i<100;i++){
        // printf("l=%lf r=%lf\n",l,r);
        auto mid=(l+r)/2.;
        for(int i=1;i<=N;i++)
            cs[i]=circle_t(meats[i],mid/hardness[i]);

        if (valid()) r=mid,ans=mid;
        else l=mid;
    }

    printf("%.7lf\n",r);
    return 0;
}
### Prompt

In CPP, your task is to solve the following problem:

Takahashi wants to grill N pieces of meat on a grilling net, which can be seen as a two-dimensional plane. The coordinates of the i-th piece of meat are \left(x_i, y_i\right), and its hardness is c_i.

Takahashi can use one heat source to grill the meat. If he puts the heat source at coordinates \left(X, Y\right), where X and Y are real numbers, the i-th piece of meat will be ready to eat in c_i \times \sqrt{\left(X - x_i\right)^2 + \left(Y-y_i\right)^2} seconds.

Takahashi wants to eat K pieces of meat. Find the time required to have K or more pieces of meat ready if he put the heat source to minimize this time.

Constraints

* All values in input are integers.
* 1 \leq N \leq 60
* 1 \leq K \leq N
* -1000 \leq x_i , y_i \leq 1000
* \left(x_i, y_i\right) \neq \left(x_j, y_j\right) \left(i \neq j \right)
* 1 \leq c_i \leq 100

Input

Input is given from Standard Input in the following format:


N K
x_1 y_1 c_1
\vdots
x_N y_N c_N


Output

Print the answer.

It will be considered correct if its absolute or relative error from our answer is at most 10^{-6}.

Examples

Input

4 3
-1 0 3
0 0 3
1 0 2
1 1 40


Output

2.4


Input

10 5
-879 981 26
890 -406 81
512 859 97
362 -955 25
128 553 17
-885 763 2
449 310 57
-656 -204 11
-270 76 40
184 170 16


Output

7411.2252

### Response

```cpp
#include <cstdio>
#include <complex>
#include <utility>
#include <vector>
#include <algorithm>

using namespace std;

typedef complex<double> point_t;
typedef pair<point_t,double> circle_t;

const double eps=1e-9;

circle_t cs[62];
point_t meats[62];
double hardness[62];

int N,K;

void add_intersect(const circle_t & c1,const circle_t & c2,vector<point_t> & v){
    auto d=abs(c1.first-c2.first);
    auto rc=(d*d+c1.second*c1.second-c2.second*c2.second)/(2*d);
    auto diff=c1.second*c1.second-rc*rc;

    if (abs(diff)<eps) diff=0.;

    if (diff<0.) return;
    auto rs=sqrt(diff);

    auto dir=(c2.first-c1.first)/d;

    if (diff==0.) v.push_back(c1.first+diff*point_t(rc,rs));
    else {
        v.push_back(c1.first+diff*point_t(rc,rs));
        v.push_back(c1.first+diff*point_t(rc,-rs));
    }
}

vector<point_t> is_cc(circle_t c1, circle_t c2) {
	vector<point_t> res;
	auto d = abs(c1.first - c2.first);
	auto rc = (d*d + c1.second*c1.second - c2.second*c2.second) / (2 * d);
	auto dfr = c1.second*c1.second - rc * rc;
	if (abs(dfr) < eps)dfr = 0.0;
	if (dfr < 0.0)return res;
	auto rs = sqrt(dfr);
	auto diff = (c2.first - c1.first) / d;
	res.push_back(c1.first + diff * point_t(rc, rs));
	if (dfr != 0.0)res.push_back(c1.first + diff * point_t(rc, -rs));
	return res;
}

int cnt(const point_t &  p){
    int ret=0;

    for(int i=1;i<=N;i++){
        // printf("r=%lf\n",cs[i].second);
        auto dist=abs(cs[i].first-p);
        // printf("dist=%lf\n",dist);
        if (dist < cs[i].second + eps) ret++;
    }
    // printf("pos=%lf,%lf ret=%d\n",p.real(),p.imag(),ret);
    return ret;
}

bool valid(){
    vector<point_t> candidate;
    for(int i=1;i<=N;i++) candidate.push_back(meats[i]);

    for(int i=1;i<=N;i++)
        for(int j=i+1;j<=N;j++){
            auto m=is_cc(cs[i],cs[j]);
            for(auto p: m) candidate.push_back(p);
        }
            // add_intersect(cs[i],cs[j],candidate);

    // for(auto &p:candidate) printf("pos=%lf %lf\n",p.real(),p.imag());

    for(auto &p:candidate) if (cnt(p)>=K) return true;

    return false;
}

int main(){
    scanf("%d%d",&N,&K);
    for(int i=1;i<=N;i++){
        double x,y,c;
        scanf("%lf%lf%lf",&x,&y,&c);
        meats[i]=point_t(x,y);
        hardness[i]=c;

        // printf("pos=%lf %lf\n",meats[i].real(),meats[i].imag());
    }
    
    double l=0.0,r=1e6;
    double ans=r;
    for(int i=1;i<100;i++){
        // printf("l=%lf r=%lf\n",l,r);
        auto mid=(l+r)/2.;
        for(int i=1;i<=N;i++)
            cs[i]=circle_t(meats[i],mid/hardness[i]);

        if (valid()) r=mid,ans=mid;
        else l=mid;
    }

    printf("%.7lf\n",r);
    return 0;
}
```