#include "bits/stdc++.h" using namespace std; #define rep(i,n) for(int i=0;i PI; typedef vector VI; const LL MOD = 1000000007LL; LL X[1000]; LL Y[1000]; struct UnionFind { int *par; int *rank; int size; UnionFind(int n) :size(n) { par = new int(size); rank = new int(size); rep(i, size) par[i] = i, rank[i] = 0; } void clear() { rep(i, size) par[i] = i, rank[i] = 0; } void unite(int x, int y) { x = find(x); y = find(y); if (x == y) return; if (rank[x] < rank[y]) { par[x] = y; } else { par[y] = x; if (rank[x] == rank[y]) rank[x]++; } } int find(int x) { if (par[x] == x) return x; return par[x] = find(par[x]); } bool same(int x, int y) { return find(x) == find(y); } }; int main() { int N; cin >> N; rep(i, N) { cin >> X[i] >> Y[i]; } LL l = 0, r = 2 * 100000000; UnionFind U(N); while (r - l > 1) { LL m = (l + r) / 2; U.clear(); rep(i, N) { rep(j, N) { if ((X[i]-X[j])*(X[i]-X[j])+(Y[i]-Y[j])*(Y[i]-Y[j]) <= (m*10)*(m*10)) { U.unite(i, j); } } } if (U.same(0, N - 1)) r = m; else l = m; } cout << r*10 << endl; }