#include <bits/stdc++.h>
using namespace std;
#define eps 1e-5

vector<pair<double, double>> intersection(double x0, double y0, double r0, double x1, double y1, double r1){
	double d = hypot(x1 - x0, y1 - y0);
	vector<pair<double, double>> ans(0);
	if(d > r0 + r1 || r1 > r0 + d || r0 > r1 + d){
		return ans;
	}
	double x = x1 - x0, y = y1 - y0;
	double x2_y2 = x * x + y * y;
	double a = (x2_y2 + r0 * r0 - r1 * r1) / 2;
	double c = sqrt(x2_y2 * r0 * r0 - a * a);
	ans.push_back(make_pair((a * x + y * c) / x2_y2 + x0, (a * y - x * c) / x2_y2 + y0));
	ans.push_back(make_pair((a * x - y * c) / x2_y2 + x0, (a * y + x * c) / x2_y2 + y0));
	return ans;
}

int overlap(int N, vector<double> &x, vector<double> &y, vector<double> &c, double T){
//	printf("T = %.10lf\n", T);
	vector<pair<double, double>> cand(N);
	int i, j, k, ans = 0;
	for(i = 0; i < N; i++){
		cand[i] = make_pair(x[i], y[i]);
	}
	for(i = 0; i < N; i++){
		for(j = i + 1; j < N; j++){
			vector<pair<double, double>> res = intersection(x[i], y[i], T / c[i], x[j], y[j], T / c[j]);
			for(k = 0; k < res.size(); k++){
				cand.push_back(res[k]);
			}
		}
	}
	for(i = 0; i < cand.size(); i++){
//		printf("cand[%d] = (%lf, %lf)\n", i, cand[i].first, cand[i].second);
		int now = 0;
		for(j = 0; j < N; j++){
			if(hypot(x[j] - cand[i].first, y[j] - cand[i].second) <= T / c[j] + eps){
				now++;
			}
		}
//		printf("now = %d\n", now);
		ans = max(ans, now);
	}
//	printf("ans = %d\n", ans);
	return ans;
}

int main(){
	int N, K, i;
	scanf("%d%d", &N, &K);
	vector<double> x(N), y(N), c(N);
	for(i = 0; i < N; i++){
		scanf("%lf%lf%lf", &x[i], &y[i], &c[i]);
	}
	double l = 0, h, r = 2000 * 100;
//	r = 5;
	for(i = 0; i < 50; i++){
		h = (l + r) / 2;
		if(overlap(N, x, y, c, h) >= K){
			r = h;
		}
		else{
			l = h;
		}
	}
	printf("%.10lf\n", h);
	return 0;
}
### Prompt

Construct a cpp code solution to the problem outlined:

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;
#define eps 1e-5

vector<pair<double, double>> intersection(double x0, double y0, double r0, double x1, double y1, double r1){
	double d = hypot(x1 - x0, y1 - y0);
	vector<pair<double, double>> ans(0);
	if(d > r0 + r1 || r1 > r0 + d || r0 > r1 + d){
		return ans;
	}
	double x = x1 - x0, y = y1 - y0;
	double x2_y2 = x * x + y * y;
	double a = (x2_y2 + r0 * r0 - r1 * r1) / 2;
	double c = sqrt(x2_y2 * r0 * r0 - a * a);
	ans.push_back(make_pair((a * x + y * c) / x2_y2 + x0, (a * y - x * c) / x2_y2 + y0));
	ans.push_back(make_pair((a * x - y * c) / x2_y2 + x0, (a * y + x * c) / x2_y2 + y0));
	return ans;
}

int overlap(int N, vector<double> &x, vector<double> &y, vector<double> &c, double T){
//	printf("T = %.10lf\n", T);
	vector<pair<double, double>> cand(N);
	int i, j, k, ans = 0;
	for(i = 0; i < N; i++){
		cand[i] = make_pair(x[i], y[i]);
	}
	for(i = 0; i < N; i++){
		for(j = i + 1; j < N; j++){
			vector<pair<double, double>> res = intersection(x[i], y[i], T / c[i], x[j], y[j], T / c[j]);
			for(k = 0; k < res.size(); k++){
				cand.push_back(res[k]);
			}
		}
	}
	for(i = 0; i < cand.size(); i++){
//		printf("cand[%d] = (%lf, %lf)\n", i, cand[i].first, cand[i].second);
		int now = 0;
		for(j = 0; j < N; j++){
			if(hypot(x[j] - cand[i].first, y[j] - cand[i].second) <= T / c[j] + eps){
				now++;
			}
		}
//		printf("now = %d\n", now);
		ans = max(ans, now);
	}
//	printf("ans = %d\n", ans);
	return ans;
}

int main(){
	int N, K, i;
	scanf("%d%d", &N, &K);
	vector<double> x(N), y(N), c(N);
	for(i = 0; i < N; i++){
		scanf("%lf%lf%lf", &x[i], &y[i], &c[i]);
	}
	double l = 0, h, r = 2000 * 100;
//	r = 5;
	for(i = 0; i < 50; i++){
		h = (l + r) / 2;
		if(overlap(N, x, y, c, h) >= K){
			r = h;
		}
		else{
			l = h;
		}
	}
	printf("%.10lf\n", h);
	return 0;
}
```