#include<bits/stdc++.h>
using namespace std;
const double eps=1e-5;
int n,fa[110];
struct POINT
{int x,y;}p[110];
inline int read()
{
	int x=0,w=0;char ch=0;
	while(!isdigit(ch)){w|=ch=='-';ch=getchar();}
	while(isdigit(ch)){x=(x<<1)+(x<<3)+(ch^48);ch=getchar();}
	return w?-x:x;
}
int getfa(int x)
{return fa[x]==x?x:fa[x]=getfa(fa[x]);}
double dis(int x,int y)
{return sqrt(pow(p[x].x-p[y].x,2)+pow(p[x].y-p[y].y,2));}
int main()
{
	n=read();
	for(int i=1;i<=n;i++)
		p[i].x=read(),p[i].y=read();
	double L=0,R=100,M,T=0;
	while(R-L>eps){
		M=(L+R)/2;
		for(int i=1;i<=n+2;i++)fa[i]=i;
		for(int i=1;i<=n;i++){
			for(int j=1;j<=n;j++)
			if(dis(i,j)<=M*2)
				fa[getfa(j)]=getfa(i);
			if(100-p[i].y<=M*2)fa[getfa(n+1)]=getfa(i);
			if(p[i].y+100<=M*2)fa[getfa(n+2)]=getfa(i);
		}
		if(getfa(n+1)!=getfa(n+2))T=L=M;
		else R=M;
	}
	printf("%.6f\n",T);
}
// Skyqwq
#include <iostream>
#include <cstdio>
#include <vector>
using namespace std;

typedef long long LL;

const int N = 2e5 + 5;

int n, k, mid, cnt, h[N];

vector<int> g[N];

int dfs(int u, int fa) {
	int s = 0, w = 0; h[u] = -2e9;
	for (int i = 0; i < g[u].size(); i++) {
		int v = g[u][i];
		if (v == fa) continue;
		int t = dfs(v, u);
		s = max(s, t + 1);
		h[u] = max(h[u], h[v] - 1);
	}
	if (s > h[u] && s >= mid) s = -1e9, h[u] = mid, cnt++;// cout << u << " ..." << endl;
	else if (s <= h[u]) {
		s = -1e9;
	}
	if (u == 1 && s >= 0) cnt++;
	return s;
}

bool inline check() {
	cnt = 0, dfs(1, 0);
	return cnt <= k;
}

int main() {
	scanf("%d%d", &n, &k);
	for (int i = 1, u, v; i < n; i++) {
		scanf("%d%d", &u, &v);
		g[u].push_back(v), g[v].push_back(u);
	}
	if (k >= n) {
		puts("0"); return 0;
	}
	int l = 1, r = n;
	
	while (l < r) {
		mid = (l + r) >> 1;
		if (check()) r = mid;
		else l = mid + 1;
	}
	printf("%d\n", r);
	return 0;
}