#include <bits/stdc++.h>
using namespace std;
const int N=505;
int fa[N],a[N],b[N];
int n,k,m,cnt;
double ans[N];
struct node{
int x,y;
double dis;
}e[N*N];
double dis(int a,int b,int c,int d){
return sqrt((a-c)*(a-c)+(b-d)*(b-d));
}
int getfa(int q){
if(fa[q]!=q) fa[q]=getfa(fa[q]);
return fa[q];
}
inline bool cmp(const node&x,const node&y){
return x.dis<y.dis;
}
int main(){
scanf("%d%d",&n,&k);
if(k>=n){
printf("0.00");return 0;
}
for(int i=1;i<=n;i++)fa[i]=i, scanf("%d%d",&a[i],&b[i]);
for(int i=1;i<=n;i++)
for(int j=i+1;j<=n;j++)
e[++m]=(node){i,j,dis(a[i],b[i],a[j],b[j])};
sort(e+1,e+m+1,cmp);
for(int i=1;i<=m;i++){
int fu=getfa(e[i].x), fv=getfa(e[i].y);
if(fu!=fv){
fa[fu]=fv;
ans[++cnt]=e[i].dis;
}
}
printf("%.2lf",ans[cnt-k+1]);
return 0;
}