#include using namespace std; #define rep(i, a, b) for (int i = int(a); i < int(b); ++i) typedef long long ll; typedef pair P; int INF = 1e9; int MOD = 1e9+7; const int MAX_N = 100000; struct UnionFind{ int par[MAX_N]; void init(int n){ for(int i = 0;i < n;i++)par[i] = i; } int root(int x){ if(par[x] == x)return x; else return par[x] = root(par[x]); } bool same(int x,int y){ return root(x) == root(y); } void unite(int x,int y){ x = root(x); y = root(y); if(x == y)return; par[y] = x; } }; ll sqrtll(ll x) { ll a = 0, c = 0, y = 0, i = 0, t = x; while (t >>= 1) { ++i; } for (i += i & 1; i >= 0; i -= 2) { c = (y << 1 | 1) <= x >> i; a = a << 1 | c; y = y << 1 | c; x -= c * y << i; y += c; } return a; } main(){ int N; cin >> N; vector< P > V(N); vector< pair > dist; rep(i,0,N){ int a,b; cin >> a >> b; V[i] = P(a,b); } rep(i,0,N)rep(j,0,N){ if(i == j)continue; ll dx = V[i].second - V[j].second; ll dy = V[i].first - V[j].first; dist.emplace_back(dx*dx + dy*dy, P(i,j)); } sort(dist.begin(), dist.end()); UnionFind uf; uf.init(N); ll maxi; for(auto p:dist){ auto pi = p.second; uf.unite(pi.first, pi.second); if(uf.same(0,N-1)){ maxi = p.first; break; } } //cout << maxi << endl; ll num; for(num = sqrt(maxi);num * num <= maxi;num++){} num = (num + 9) / 10 * 10; cout << num << endl; }