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

Solution (in PYTHON3):

Solution:
# coding: utf-8
import sys
#from operator import itemgetter
sysread = sys.stdin.readline
#from heapq import heappop, heappush
#from collections import defaultdict
sys.setrecursionlimit(10**7)
import math
from itertools import combinations

def run():
    N, K = map(int, sysread().split())
    niku = []
    for i in range(N):
        niku.append([i]+list(map(int, sysread().split())))

    high_t = math.sqrt(2000**2 + 2000**2) * 101
    low_t = 0
    current = (high_t + low_t) / 2
    delta = 5e-7
    if K == 1:
        print(0)
        return None

    while high_t - low_t > delta:
        done = False
        c = [(current / ci) ** 2 for _, _, _, ci in niku]
        for i, xi, yi, _ in niku:
            if done:
                break
            K0 = 0
            for k, xk, yk, _ in niku:
                if done:
                    break
                ck = c[k]
                if ((xi - xk) ** 2 + (yi - yk) ** 2) <= ck + delta:
                    K0 += 1
                if K0 >= K:
                    done = True


        for (i, xi, yi, _), (j, xj, yj, _) in combinations(niku, 2):
            if done:
                break
            ci, cj = c[i], c[j]
            xj -= xi
            yj -= yi
            d2 = xj ** 2 + yj ** 2
            d = math.sqrt(d2)

            x = (d2 + ci - cj) / (2 * d)
            e = ci - x ** 2
            if e < 0 or math.sqrt(ci) + math.sqrt(cj) < d:
                continue
            else:
                e = math.sqrt(e)

            vx1, vy1 = xj / d, yj / d
            vx2, vy2 = yj / d, -xj / d

            X1 = vx1 * x + vx2 * e + xi
            X2 = vx1 * x - vx2 * e + xi
            Y1 = vy1 * x + vy2 * e + yi
            Y2 = vy1 * x - vy2 * e + yi

            K1 = 0
            K2 = 0

            for k, xk, yk, _ in niku:
                if done:
                    break
                ck = c[k]
                if ((xk - X1) ** 2 + (yk - Y1) ** 2) <= ck + delta:
                    K1 += 1
                if ((xk - X2) ** 2 + (yk - Y2) ** 2) <= ck + delta:
                    K2 += 1
                if K1 >= K or K2 >= K:
                    done = True


        if done:
            high_t = current
            current = (high_t + low_t) / 2
        else:
            low_t = current
            current = (high_t + low_t) / 2

    print((low_t + high_t) / 2)
    return None

if __name__ == "__main__":
    run()