using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using static System.Math;
using System.Text;
using System.Threading;
using System.Globalization;
using System.Runtime.CompilerServices;
using Library;

namespace Program
{
    public static class ABC157F
    {
        static public int numberOfRandomCases = 0;
        static public void MakeTestCase(List<string> _input, List<string> _output, ref Func<string[], bool> _outputChecker)
        {
        }
        static public void Solve()
        {
            var N = NN;
            var K = NN;
            var xycList = Repeat(0, N).Select(_ => new { x = ND, y = ND, c = ND }).ToArray();
            var left = 0d;
            var right = 3000000d;
            var centers = xycList.Select(e => new LIB_Geo2D.Vec(e.x, e.y)).ToArray();
            for(int xx = 0;xx < 200;++xx)
            {
                var mid = (right + left) / 2;
                var cnt = 0L;
                {
                    var points = new List<LIB_Geo2D.Vec>();
                    var curcles = xycList.Select(e => new LIB_Geo2D.Circle() { p = new LIB_Geo2D.Vec(e.x, e.y), r2 = (mid / e.c) * (mid / e.c) }).ToArray();
                    for (var i = 0; i < N; i++)
                    {
                        for (var j = i + 1; j < N; j++)
                        {
                            points.AddRange(LIB_Geo2D.Intersection(curcles[i], curcles[j]));
                        }
                    }
                    foreach (var item in points.Concat(centers))
                    {
                        var thisCnt = 0L;
                        foreach (var item2 in curcles)
                        {
                            if (LIB_Geo2D.Distance(item, item2) <= LIB_Geo2D.EPS) ++thisCnt;
                        }
                        cnt = Max(cnt, thisCnt);
                    }
                }
                if (cnt < K) left = mid;
                else right = mid;
            }
            Console.WriteLine(right);
        }
        static class Console_
        {
            static Queue<string> param = new Queue<string>();
            public static string NextString() { if (param.Count == 0) foreach (var item in Console.ReadLine().Split(' ')) param.Enqueue(item); return param.Dequeue(); }
        }
        class Printer : StreamWriter
        {
            public override IFormatProvider FormatProvider { get { return CultureInfo.InvariantCulture; } }
            public Printer(Stream stream) : base(stream, new UTF8Encoding(false, true)) { base.AutoFlush = false; }
            public Printer(Stream stream, Encoding encoding) : base(stream, encoding) { base.AutoFlush = false; }
        }
        static public void Main(string[] args) { if (args.Length == 0) { Console.SetOut(new Printer(Console.OpenStandardOutput())); } var t = new Thread(Solve, 134217728); t.Start(); t.Join(); Console.Out.Flush(); }
        static long NN => long.Parse(Console_.NextString());
        static double ND => double.Parse(Console_.NextString());
        static string NS => Console_.NextString();
        static long[] NNList(long N) => Repeat(0, N).Select(_ => NN).ToArray();
        static double[] NDList(long N) => Repeat(0, N).Select(_ => ND).ToArray();
        static string[] NSList(long N) => Repeat(0, N).Select(_ => NS).ToArray();
        static IEnumerable<T> OrderByRand<T>(this IEnumerable<T> x) => x.OrderBy(_ => xorshift);
        static long Count<T>(this IEnumerable<T> x, Func<T, bool> pred) => Enumerable.Count(x, pred);
        static IEnumerable<T> Repeat<T>(T v, long n) => Enumerable.Repeat<T>(v, (int)n);
        static IEnumerable<int> Range(long s, long c) => Enumerable.Range((int)s, (int)c);
        static IEnumerable<string> OrderBy(this IEnumerable<string> x) => x.OrderBy(e => e, StringComparer.OrdinalIgnoreCase);
        static IEnumerable<T> OrderBy<T>(this IEnumerable<T> x, Func<T, string> selector) => x.OrderBy(selector, StringComparer.OrdinalIgnoreCase);
        static IEnumerable<string> OrderByDescending(this IEnumerable<string> x) => x.OrderByDescending(e => e, StringComparer.OrdinalIgnoreCase);
        static IEnumerable<T> OrderByDescending<T>(this IEnumerable<T> x, Func<T, string> selector) => x.OrderByDescending(selector, StringComparer.OrdinalIgnoreCase);
        static uint xorshift { get { _xsi.MoveNext(); return _xsi.Current; } }
        static IEnumerator<uint> _xsi = _xsc();
        static IEnumerator<uint> _xsc() { uint x = 123456789, y = 362436069, z = 521288629, w = (uint)(DateTime.Now.Ticks & 0xffffffff); while (true) { var t = x ^ (x << 11); x = y; y = z; z = w; w = (w ^ (w >> 19)) ^ (t ^ (t >> 8)); yield return w; } }
    }
}
namespace Library
{
}
namespace Library {
    class LIB_Geo2D
    {
        static readonly public double EPS = 1e-8;
        public struct Vec
        {
            public double x;
            public double y;
            public Vec(double x, double y) { this.x = x; this.y = y; }
            [MethodImpl(MethodImplOptions.AggressiveInlining)]
            static public Vec operator +(Vec a, Vec b) => new Vec() { x = a.x + b.x, y = a.y + b.y };
            [MethodImpl(MethodImplOptions.AggressiveInlining)]
            static public Vec operator -(Vec a, Vec b) => new Vec() { x = a.x - b.x, y = a.y - b.y };
            [MethodImpl(MethodImplOptions.AggressiveInlining)]
            static public Vec operator *(Vec p, double v) => new Vec() { x = p.x * v, y = p.y * v };
            [MethodImpl(MethodImplOptions.AggressiveInlining)]
            static public Vec operator *(double v, Vec p) => p * v;
            [MethodImpl(MethodImplOptions.AggressiveInlining)]
            static public Vec operator /(Vec p, double v) => new Vec() { x = p.x / v, y = p.y / v };
            [MethodImpl(MethodImplOptions.AggressiveInlining)]
            static public Vec operator /(double v, Vec p) => p / v;
        }
        public struct Circle
        {
            public Vec p;
            /// <summary>
            /// 蜊雁ｾ・・2荵・            /// </summary>
            public double r2;
            /// <summary>
            /// 蜊雁ｾ・            /// </summary>
            public double r
            {
                [MethodImpl(MethodImplOptions.AggressiveInlining)]
                get { return Sqrt(r2); }
                private set { }
            }
        }
        /// <summary>
        /// 轤ｹ縺ｨ轤ｹ縺ｮ霍晞屬縺ｮ2荵励ｒ豎ゅａ繧・        /// </summary>
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        static public double Distance(Vec p1, Vec p2) => Norm(p2 - p1);
        /// <summary>
        /// 轤ｹ縺ｨ蜀・・霍晞屬縺ｮ2荵励ｒ豎ゅａ繧九りｲ縺ｮ蝣ｴ蜷医・蜀・・蜀・・縺ｫ縺・ｋ・育ｵｶ蟇ｾ蛟､縺ｯ荳逡ｪ霑代＞蜀・・邵√∪縺ｧ縺ｮ霍晞屬・・        /// </summary>
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        static public double Distance(Vec p, Circle c) => Norm(p - c.p) - c.r2;
        /// <summary>
        /// 轤ｹ縺ｨ蜀・・霍晞屬縺ｮ2荵励ｒ豎ゅａ繧九りｲ縺ｮ蝣ｴ蜷医・蜀・・蜀・・縺ｫ縺・ｋ・育ｵｶ蟇ｾ蛟､縺ｯ荳逡ｪ霑代＞蜀・・邵√∪縺ｧ縺ｮ霍晞屬・・        /// </summary>
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        static public double Distance(Circle c, Vec p) => Norm(p - c.p) - c.r2;
        /// <summary>
        /// 蜀・→蜀・・莠､轤ｹ繧呈ｱゅａ繧・        /// </summary>
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        static public Vec[] Intersection(Circle c1, Circle c2)
        {
            var p = c2.p - c1.p;
            var b = p.x * p.x + p.y * p.y;
            var a = (b + c1.r2 - c2.r2) / 2;
            var d = b * c1.r2 - a * a;
            if (d < -EPS) return new Vec[0];
            if (d > EPS)
            {
                var c = Sqrt(d);
                var p1 = new Vec((a * p.x + p.y * c) / b + c1.p.x, (a * p.y - p.x * c) / b + c1.p.y);
                var p2 = new Vec((a * p.x - p.y * c) / b + c1.p.x, (a * p.y + p.x * c) / b + c1.p.y);
                return new[] { p1, p2 };
            }
            return new[] { new Vec(a * p.x / b + c1.p.x, a * p.y / b + c1.p.y) };
        }
        /// <summary>
        /// p縺ｮ髟ｷ縺輔・2荵励ｒ蠕励ｋ
        /// </summary>
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        static public double Norm(Vec p) => p.x * p.x + p.y * p.y;
        /// <summary>
        /// 蜀・ｩ・        /// </summary>
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        static public double Dot(Vec p1, Vec p2) => p1.x * p2.x + p1.y * p2.y;
        /// <summary>
        /// 螟也ｩ搾ｼ亥ｹｳ陦悟屁霎ｺ蠖｢縺ｮ髱｢遨搾ｼ芽ｲ縺ｫ縺ｪ繧雁ｾ励ｋ
        /// </summary>
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        static public double Cross(Vec p1, Vec p2) => p1.x * p2.y - p1.y * p2.x;
        /// <summary>
        /// 3轤ｹ繧帝壹ｋ蜀・ｒ霑斐☆
        /// </summary>
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        static public Circle GetCircleFrom3Vec(Vec p1, Vec p2, Vec p3)
        {
            var A = Distance(p2, p3);
            var B = Distance(p1, p3);
            var C = Distance(p1, p2);
            var S = Abs(Cross(p2 - p1, p3 - p1));
            var p = (A * (B + C - A) * p1 + B * (C + A - B) * p2 + C * (A + B - C) * p3) / (4 * S * S);
            var r = Distance(p, p1);
            return new Circle() { p = p, r2 = r };
        }
        /// <summary>
        /// 2轤ｹ繧帝壹ｋ蜀・ｒ霑斐☆
        /// </summary>
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        static public Circle GetCircleFrom2Vec(Vec p1, Vec p2)
        {
            var c = (p1 + p2) / 2;
            return new Circle() { p = c, r2 = Distance(p1, c) };
        }
        /// <summary>
        /// 譛蟆丞桁蜷ｫ蜀・ｒ霑斐☆
        /// </summary>
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        static public Circle GetEncloseCircle(IEnumerable<Vec> pointList)
        {
            var pList = pointList.ToArray();
            if (pList.Length < 2) throw new Exception();
            var rnd = new Random();
            var list = pList.OrderBy(_ => rnd.Next()).ToArray();
            Func<Vec, Circle, bool> inCircle = null;
            inCircle = (p, c) => Distance(p, c) < EPS;
            {
                var c = GetCircleFrom2Vec(list[0], list[1]);
                for (var i = 2; i < list.Length; i++)
                {
                    if (!inCircle(list[i], c))
                    {
                        c = GetCircleFrom2Vec(list[0], list[i]);
                        for (var j = 1; j < i; j++)
                        {
                            if (!inCircle(list[j], c))
                            {
                                c = GetCircleFrom2Vec(list[i], list[j]);
                                for (var k = 0; k < j; k++)
                                {
                                    if (!inCircle(list[k], c))
                                    {
                                        c = GetCircleFrom3Vec(list[i], list[j], list[k]);
                                    }
                                }
                            }
                        }
                    }
                }
                return c;
            }
        }
    }
}


Measured memory_bytes: 33188