//Serene
#include<algorithm>
#include<iostream>
#include<cstring>
#include<cstdlib>
#include<cstdio>
#include<cmath>
using namespace std;
const int maxn=1e3+10;
int n,k,xx[maxn],yy[maxn],fa[maxn];
int aa;char cc;
int read() {
aa=0;cc=getchar();
while(cc<‘0‘||cc>‘9‘) cc=getchar();
while(cc>=‘0‘&&cc<=‘9‘) aa=aa*10+cc-‘0‘,cc=getchar();
return aa;
}
int tot=0;
struct Li{
int x,y;double dis;
}li[maxn*maxn];
double gdis(int x,int y) {
return sqrt((double)(xx[x]-xx[y])*(double)(xx[x]-xx[y])+(double)(yy[x]-yy[y])*(double)(yy[x]-yy[y]));
}
bool cmp(const Li& a,const Li& b) {
return a.dis<b.dis;
}
int find(int x) {
return x==fa[x]? x:fa[x]=find(fa[x]);
}
int main() {
n=read();k=read();
for(int i=1;i<=n;++i) xx[i]=read(),yy[i]=read(),fa[i]=i;
for(int i=1;i<=n;++i) for(int j=i+1;j<=n;++j) {
li[++tot].x=i;li[tot].y=j;
li[tot].dis=gdis(i,j);
}
sort(li+1,li+tot+1,cmp);
int a,b,tt=0;double ans=0;
for(int i=1;i<=tot;++i) {
a=find(li[i].x);b=find(li[i].y);
if(a!=b) {
tt++;fa[a]=b;
if(tt==n-k) {
for(int j=i+1;j<=tot;++j) {
a=find(li[j].x);b=find(li[j].y);
if(a!=b) {
ans=li[j].dis;
break;
}
}
break;
}
}
}
printf("%.2lf",ans);
return 0;
}