#include using namespace std; namespace { typedef long double real; typedef long long ll; template ostream& operator<<(ostream& os, const vector& vs) { if (vs.empty()) return os << "[]"; os << "[" << vs[0]; for (int i = 1; i < vs.size(); i++) os << " " << vs[i]; return os << "]"; } template istream& operator>>(istream& is, vector& vs) { for (auto it = vs.begin(); it != vs.end(); it++) is >> *it; return is; } template istream& operator>>(istream& is, pair& p) { return is >> p.first >> p.second; } int N; vector> P; void input() { cin >> N; P.resize(N); cin >> P; } ll dist2(pair a, pair b) { ll dx = a.first - b.first; ll dy = a.second - b.second; return dx*dx + dy*dy; } struct UnionFind { vector P; UnionFind(int N) : P(N, -1) {} int root(int x) { if (P[x] < 0) return x; return P[x] = root(P[x]); } void merge(int x, int y) { x = root(x); y = root(y); if (x == y) return; P[x] = y; } bool query(int x, int y) { return root(x) == root(y); } }; bool C(ll r) { UnionFind uf(N); for (int i = 0; i < N; i++) { for (int j = i + 1; j < N; j++) { if (dist2(P[i], P[j]) <= r*r) { uf.merge(i, j); } } } return uf.query(0, N - 1); } void solve() { ll lb = 0, ub = ll(2e9); for (int i = 0; i < 200; i++) { ll mid = (lb + ub) / 2LL; (C(mid) ? ub : lb) = mid; } cout << (ub + 9) / 10 * 10 << endl; } } int main() { input(); solve(); return 0; }