#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef _MSC_VER #include #endif #define FOR(i, a, b) for(int i = (a); i < (int)(b); ++i) #define rep(i, n) FOR(i, 0, n) #define ALL(v) v.begin(), v.end() #define REV(v) v.rbegin(), v.rend() #define MEMSET(v, s) memset(v, s, sizeof(v)) #define UNIQUE(v) (v).erase(unique(ALL(v)), (v).end()) #define MP make_pair #define MT make_tuple using namespace std; typedef long long ll; typedef long double ld; typedef pair P; const int N = 1010; int par[N]; int find(int x){ if (x == par[x]) return x; return par[x] = find(par[x]); } void unite(int x, int y){ par[find(x)] = find(y); } int main(){ cin.tie(0); ios::sync_with_stdio(false); cout.setf(ios::fixed); cout.precision(20); int n; cin >> n; vector x(n), y(n); rep(i, n) cin >> x[i] >> y[i]; vector> edge; rep(i, n) rep(j, i){ ld dist = sqrt((x[i] - x[j])*(x[i] - x[j]) + (y[i] - y[j])*(y[i] - y[j])); ll x = dist; if (x < dist) ++x; while (x % 10) ++x; edge.push_back(MT(x, i, j)); } rep(i, n) par[i] = i; sort(ALL(edge)); ll ans = 0; int cnt = 1; for (auto e : edge){ ll cost; int x, y; tie(cost, x, y) = e; if (find(x) == find(y)) continue; unite(x, y); ++cnt; ans = max(ans, cost); if (find(0) == find(n - 1)) break; } cout << ans << endl; }