#include<stdio.h>
#include<math.h>
int s, p;
int a[100000], b[100000], fa[100000];
int n, sum;
double ans;
struct node {
double x, y, z;
}stu[1000001];
void swap(struct node* x, struct node* y)
{
struct node temp = *x;
*x = *y;
*y = temp;
}
int find(int x)
{
if (fa[x] == x) return x;
else
{
fa[x] = find(fa[x]);
return fa[x];
}
}
void qsort(int start, int end)
{
if (start >= end) return;
int left = start, right = end;
int key = left;
while (left < right)
{
while (stu[right].z >= stu[key].z && left < right) {
right--;
}
while (stu[left].z <= stu[key].z && left < right) {
left++;
}
swap(&stu[left], &stu[right]);
}swap(&stu[key], &stu[right]);
key = right;
qsort(start, key - 1);
qsort(key+1, end);
}
int main()
{
scanf("%d %d", &s, &p);
for (int i = 1; i <= p; i++)
{
scanf("%d %d", &a[i], &b[i]);
for (int j = 1; j < i; j++)
{
n++;
stu[n].z = sqrt((a[i] - a[j]) * (a[i] - a[j]) + (b[i] - b[j]) * (b[i] - b[j]));
stu[n].x = i;
stu[n].y = j;
}
}
for (int i = 1; i <= p; i++) {
fa[i] = i;
}
qsort(1,n);
for (int i = 1; i <= n; i++)
{
if ((find(stu[i].x)) != (find(stu[i].y))) {
fa[find(stu[i].x)] = find(stu[i].y);
ans = stu[i].z;
sum++;
if (sum >= p - s) {
printf("%.2lf", ans);
return 0;
}
}
}
return 0;
}