#include using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector VI; typedef vector VVI; #define REP(i, n) for(int(i)=0;(i)<(n);++(i)) #define FOR(i, f, t) for(int(i)=(f);(i)<(t);(++i)) #define EACH(it, c) for(auto it=(c).begin();it!=(c).end();++it) const int MOD = int(1e9+7); int N,M,W,H; ll X[1111],Y[1111]; class uf_ { public: vector node; uf_(int n) : node(n, -1){;} void con(int n, int m){ n = root(n); m = root(m); if(n == m) return; node[n] += node[m]; node[m] = n; } bool is_con(int n, int m){ return root(n) == root(m); } int root(int n){ return (node[n] < 0) ? n : node[n] = root(node[n]); } int size(int n){ return -node[root(n)]; } }; int main(){ do { cin.tie(0); ios_base::sync_with_stdio(false); } while(0); cin >> N; REP(i,N) cin >> X[i] >> Y[i]; vector > > v; REP(i,N) FOR(j,i+1,N){ ll d = (X[i]-X[j])*(X[i]-X[j]) + (Y[i]-Y[j])*(Y[i]-Y[j]); v.push_back(make_pair(d, make_pair(i,j))); } sort(v.begin(), v.end()); uf_ uf(N); ll d = 0; EACH(it, v){ d = it->first; int u = it->second.first, v = it->second.second; uf.con(u,v); if(uf.is_con(0,N-1)) break; } ll res = int(sqrt(d+.0)/10)*10; while(res*res < d) res+=10; cout << res << endl; return 0; }