/**
 *   @FileName	a.cpp
 *   @Author	kanpurin
 *   @Created	2020.05.24 01:26:45
**/

#include "bits/stdc++.h" 
using namespace std; 
typedef long long ll;

ll f(ll x1,ll x2, ll y1,ll y2) {
    ll res;
    for (res = ((ll)ceil(sqrt((x1-x2) * (x1-x2) + (y1-y2) * (y1-y2)))) / 10 * 10; res * res < (x1-x2) * (x1-x2) + (y1-y2) * (y1-y2); res+=10) {
    }
    return res;
}
// UnionFind
class UnionFind {
private:
    vector<int> par;
public:
    UnionFind(int n) {
        par.resize(n, -1);
    }
    int root(int x) {
        if (par[x] < 0) return x;
        return par[x] = root(par[x]);
    }
    bool unite(int x, int y) {
        int rx = root(x);
        int ry = root(y);
        if (rx == ry) return false;
        if (size(rx) < size(ry)) swap(rx, ry);
        par[rx] += par[ry];
        par[ry] = rx;
        return true;
    }
    bool same(int x, int y) {
        int rx = root(x);
        int ry = root(y);
        return rx == ry;
    }
    int size(int x) {
        return -par[root(x)];
    }
};
int main() {
    int n;cin >> n;
    vector<pair<int,int>> a(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i].first >> a[i].second;
    }
    vector<tuple<ll,int,int>> v;
    for (int i = 0; i < n; i++) {
        for (int j = i + 1; j < n; j++) {
            v.push_back(make_tuple(f(a[i].first,a[j].first,a[i].second,a[j].second),i,j));
        }
    }
    sort(v.begin(), v.end());
    UnionFind uf(n);
    for (int i = 0; i < v.size(); i++) {
        uf.unite(get<1>(v[i]),get<2>(v[i]));
        if (uf.same(0,n-1)){
            cout << get<0>(v[i]) << endl;
            break;
        }
    }
    return 0;
}