#include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;

#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
//-------------------------------------------------------

int N,K;
double X[100],Y[100],C[100];

double mi=1e9;

int go(double x,double y,double T) {
	int count=0;
	int i;
	
	
	FOR(i,N) if(hypot(x-X[i],y-Y[i])*C[i]<=T+(1e-9)) count++;
	return count;
}

double ok(double T) {
	int i,j;
	FOR(i,N) if(go(X[i],Y[i],T)>=K) return 1;
	
	FOR(j,N) FOR(i,j) {
		double r1=T/C[i];
		double r2=T/C[j];
		double d=hypot(X[i]-X[j],Y[i]-Y[j]);
		if(r1+r2<d) continue;
		if(r1+d<r2) continue;
		if(d+r2<r1) continue;
		double s=(r1+r2+d)/2;
		double a=sqrt(s*(s-r1)*(s-r2)*(s-d));
		double h=a/d*2;
		double d2=sqrt(r1*r1-h*h);
		double dx1=(X[j]-X[i])/d;
		double dy1=(Y[j]-Y[i])/d;
		double dx2=dy1;
		double dy2=-dx1;
		for(int cx=-1;cx<=1;cx+=2) {
			for(int cy=-1;cy<=1;cy+=2) {
				double tx=X[i]+cx*d2*dx1+cy*h*dx2;
				double ty=Y[i]+cx*d2*dy1+cy*h*dy2;
				if(go(tx,ty,T)>=K) return 1;
			}
		}
		
		
	}
	return 0;
}

void solve() {
	int i,j,k,l,r,x,y; string s;
	
	cin>>N>>K;
	FOR(i,N) cin>>X[i]>>Y[i]>>C[i];
	
	double L=0,R=1e9;
	FOR(i,100) {
		double M=(L+R)/2;
		if(ok(M)) R=M;
		else L=M;
	}
	
	_P("%.12lf\n",L);
}


int main(int argc,char** argv){
	string s;int i;
	if(argc==1) ios::sync_with_stdio(false), cin.tie(0);
	FOR(i,argc-1) s+=argv[i+1],s+='\n'; FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
	cout.tie(0); solve(); return 0;
}

### Prompt

Please create a solution in cpp to 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 <bits/stdc++.h>
using namespace std;
typedef signed long long ll;

#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
//-------------------------------------------------------

int N,K;
double X[100],Y[100],C[100];

double mi=1e9;

int go(double x,double y,double T) {
	int count=0;
	int i;
	
	
	FOR(i,N) if(hypot(x-X[i],y-Y[i])*C[i]<=T+(1e-9)) count++;
	return count;
}

double ok(double T) {
	int i,j;
	FOR(i,N) if(go(X[i],Y[i],T)>=K) return 1;
	
	FOR(j,N) FOR(i,j) {
		double r1=T/C[i];
		double r2=T/C[j];
		double d=hypot(X[i]-X[j],Y[i]-Y[j]);
		if(r1+r2<d) continue;
		if(r1+d<r2) continue;
		if(d+r2<r1) continue;
		double s=(r1+r2+d)/2;
		double a=sqrt(s*(s-r1)*(s-r2)*(s-d));
		double h=a/d*2;
		double d2=sqrt(r1*r1-h*h);
		double dx1=(X[j]-X[i])/d;
		double dy1=(Y[j]-Y[i])/d;
		double dx2=dy1;
		double dy2=-dx1;
		for(int cx=-1;cx<=1;cx+=2) {
			for(int cy=-1;cy<=1;cy+=2) {
				double tx=X[i]+cx*d2*dx1+cy*h*dx2;
				double ty=Y[i]+cx*d2*dy1+cy*h*dy2;
				if(go(tx,ty,T)>=K) return 1;
			}
		}
		
		
	}
	return 0;
}

void solve() {
	int i,j,k,l,r,x,y; string s;
	
	cin>>N>>K;
	FOR(i,N) cin>>X[i]>>Y[i]>>C[i];
	
	double L=0,R=1e9;
	FOR(i,100) {
		double M=(L+R)/2;
		if(ok(M)) R=M;
		else L=M;
	}
	
	_P("%.12lf\n",L);
}


int main(int argc,char** argv){
	string s;int i;
	if(argc==1) ios::sync_with_stdio(false), cin.tie(0);
	FOR(i,argc-1) s+=argv[i+1],s+='\n'; FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
	cout.tie(0); solve(); return 0;
}

```