#include using namespace std; using i64 = int64_t; using vi = vector; using vvi = vector; struct edge { int s, t; i64 dist; }; vi par; int find(int x) { if (x == par[x]) return x; return par[x] = find(par[x]); } void unite(int x, int y) { x = find(x); y = find(y); par[x] = y; } bool same(int x, int y) { return find(x) == find(y); } int main() { int n; cin >> n; vector edges; using ii = pair; vector as; for (int i = 0; i < n; i++) { int x, y; cin >> x >> y; as.push_back(ii(x, y)); } for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { edges.push_back((edge){i, j, (as[i].first - as[j].first) * (as[i].first - as[j].first) + (as[i].second - as[j].second) * (as[i].second - as[j].second)}); } } sort(edges.begin(), edges.end(), [](edge a, edge b) {return a.dist < b.dist;}); par = vi(n); iota(par.begin(), par.end(), 0); i64 ans = 0; for (auto& e: edges) { if (same(0, n - 1)) break; if (same(e.s, e.t)) continue; i64 d = e.dist; i64 l = 0, r = 2e9; while (l < r - 1) { i64 m = (l + r) / 2; if (m * m <= d) { l = m; } else { r = m; } } if (l * l == d) { ans = max(ans, (l + 9) / 10); } else { ans = max(ans, (l + 10) / 10); } unite(e.s, e.t); } cout << ans * 10 << endl; }