#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef _MSC_VER #include #endif #define FOR(i, a, b) for(int i = (a); i < (int)(b); ++i) #define rep(i, n) FOR(i, 0, n) #define ALL(v) v.begin(), v.end() #define REV(v) v.rbegin(), v.rend() #define MEMSET(v, s) memset(v, s, sizeof(v)) #define UNIQUE(v) (v).erase(unique(ALL(v)), (v).end()) #define MP make_pair #define MT make_tuple using namespace std; typedef long long ll; //typedef pair P; const double EPS = 1e-8; const double INF = 1e12; typedef complex P; typedef P point; namespace std { bool operator < (const P& a, const P& b) { return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b); } } double cross(const P& a, const P& b) { return imag(conj(a)*b); } double dot(const P& a, const P& b) { return real(conj(a)*b); } struct L : public vector

{ L(const P &a, const P &b) { push_back(a); push_back(b); } }; typedef vector

G; struct C { P p; double r; C(const P &p, double r) : p(p), r(r) { } }; int ccw(P a, P b, P c) { b -= a; c -= a; if (cross(b, c) > 0) return +1; // counter clockwise if (cross(b, c) < 0) return -1; // clockwise if (dot(b, c) < 0) return +2; // c--a--b on line if (norm(b) < norm(c)) return -2; // a--b--c on line return 0; } vector convex_hull(vector ps) { int n = ps.size(), k = 0; sort(ps.begin(), ps.end()); vector ch(2 * n); for (int i = 0; i < n; ch[k++] = ps[i++]) // lower-hull while (k >= 2 && ccw(ch[k - 2], ch[k - 1], ps[i]) <= 0) --k; for (int i = n - 2, t = k + 1; i >= 0; ch[k++] = ps[i--]) // upper-hull while (k >= t && ccw(ch[k - 2], ch[k - 1], ps[i]) <= 0) --k; ch.resize(k - 1); return ch; } typedef double number; typedef vector

polygon; #define curr(P, i) P[i] #define next(P, i) P[(i+1)%P.size()] #define diff(P, i) (next(P, i) - curr(P, i)) number convex_diameter(const polygon &pt) { const int n = pt.size(); int is = 0, js = 0; for (int i = 1; i < n; ++i) { if (imag(pt[i]) > imag(pt[is])) is = i; if (imag(pt[i]) < imag(pt[js])) js = i; } number maxd = norm(pt[is] - pt[js]); int i, maxi, j, maxj; i = maxi = is; j = maxj = js; do { if (cross(diff(pt, i), diff(pt, j)) >= 0) j = (j + 1) % n; else i = (i + 1) % n; if (norm(pt[i] - pt[j]) > maxd) { maxd = norm(pt[i] - pt[j]); maxi = i; maxj = j; } } while (i != is || j != js); return maxd; /* farthest pair is (maxi, maxj). */ } const int N = 120010; struct UnionFind{ int par[N]; UnionFind(int n){ iota(par, par + n, 0); } int find(int x){ if (par[x] == x) return x; return par[x] = find(par[x]); } void unite(int x, int y){ par[find(x)] = find(y); } }; template void func(vector> &vp, UnionFind &uf, T func){ sort(ALL(vp), func); int n = vp.size(); rep(i, n - 1){ if (norm(vp[i].first - vp[i + 1].first) < 100 + EPS) uf.unite(vp[i].second, vp[i + 1].second); } } int main(){ cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; vector> vp; rep(i, n){ int x, y; cin >> x >> y; vp.push_back(MP(P(x, y), i)); } UnionFind uf(n); func(vp, uf, [](pair a, pair b){return a.first.real() < b.first.real(); }); func(vp, uf, [](pair a, pair b){return a.first.imag() < b.first.imag(); }); sort(ALL(vp), [](pair a, pair b){return a.second < b.second; }); map> m; rep(i, n) m[uf.find(i)].push_back(vp[i].first); double ans = 0; for (auto p : m){ auto poly = p.second; if (poly.size() <= 2){ if(poly.size() != 1) ans = max(ans, abs(poly[0] - poly[1])); } else{ ans = max(ans, sqrt(convex_diameter(convex_hull(poly)))); } } cout.setf(ios::fixed); cout.precision(12); cout << ans + 2 << endl; return 0; }