#include "bits/stdc++.h" using namespace std; #define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i)) #define rer(i,l,u) for(int (i)=(int)(l);(i)<=(int)(u);++(i)) #define reu(i,l,u) for(int (i)=(int)(l);(i)<(int)(u);++(i)) static const int INF = 0x3f3f3f3f; static const long long INFL = 0x3f3f3f3f3f3f3f3fLL; typedef vector vi; typedef pair pii; typedef vector > vpii; typedef long long ll; template static void amin(T &x, U y) { if (y < x) x = y; } template static void amax(T &x, U y) { if (x < y) x = y; } struct UnionFind { vector data; void init(int n) { data.assign(n, -1); } bool unionSet(int x, int y) { x = root(x); y = root(y); if (x != y) { if (data[y] < data[x]) swap(x, y); data[x] += data[y]; data[y] = x; } return x != y; } bool findSet(int x, int y) { return root(x) == root(y); } int root(int x) { return data[x] < 0 ? x : data[x] = root(data[x]); } int size(int x) { return -data[root(x)]; } }; struct P { typedef int T; typedef ll T2; //T2は{a*b | a:T, b:T}を含むタイプ T x, y; P(T x_, T y_) : x(x_), y(y_) {} P() : x(0), y(0) {} }; inline bool operator==(const P& a, const P& b) { return a.x == b.x && a.y == b.y; } inline bool operator<(const P& a, const P& b) { return a.x < b.x || (a.x == b.x && a.y < b.y); } inline P operator+(const P& a, const P& b) { return P(a.x + b.x, a.y + b.y); } inline P operator-(const P& a, const P& b) { return P(a.x - b.x, a.y - b.y); } inline P operator-=(P& a, const P& b) { a.x -= b.x, a.y -= b.y; return a; } inline P::T2 cross(const P& a, const P& b) { return (P::T2)a.x*b.y - (P::T2)a.y*b.x; } inline P::T2 dot(const P& a, const P& b) { return (P::T2)a.x*b.x + (P::T2)a.y*b.y; } inline P::T2 norm(const P& a) { return (P::T2)a.x*a.x + (P::T2)a.y*a.y; } ostream& operator<<(ostream& out, const P& x) { out << "(" << x.x << ", " << x.y << ")"; return out; } inline int ccw(const P& a, const P& b, const P& c) { int ax = b.x - a.x, ay = b.y - a.y, bx = c.x - a.x, by = c.y - a.y; P::T2 t = (P::T2)ax*by - (P::T2)ay*bx; if (t > 0) return 1; if (t < 0) return -1; if ((P::T2)ax*bx + (P::T2)ay*by < 0) return +2; if ((P::T2)ax*ax + (P::T2)ay*ay < (P::T2)bx*bx + (P::T2)by*by) return -2; return 0; } vector

convex_hull(vector

ps) { if ((int)ps.size() <= 1) return 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; } int main() { int N; while (~scanf("%d", &N)) { vector > points(N); for (int i = 0; i < N; ++ i) scanf("%d%d", &points[i].first, &points[i].second); sort(points.begin(), points.end()); const int D = 10, W = 10000, H = 10000; UnionFind uf; uf.init(N); { vector> ids(D + 1, vector(H * 2 + 1, -1)); auto get = [&](int x, int y) -> int& { x %= D + 1; if (x < 0) x += D + 1; return ids[x][y + H]; }; int pi = 0, qi = 0; rer(x, -W, W) { for (; qi != N && points[qi].first == x - D - 1; ++ qi) get(x - D - 1, points[qi].second) = -1; for (; pi != N && points[pi].first == x; ++ pi) { int y = points[pi].second; rer(dx, -D, 0) { rer(dy, -D, D) { if (dx * dx + dy * dy > D * D || y + dy < -H || y + dy > H) continue; int pj = get(x + dx, y + dy); if (pj != -1) uf.unionSet(pi, pj); } } get(x, y) = pi; } } } vector> ccs(N); rep(i, N) ccs[uf.root(i)].emplace_back(points[i].first, points[i].second); double ans = 1; for (auto &cc : ccs) if(!cc.empty()) { cc = convex_hull(cc); ll maxd = 0; rep(i, cc.size()) rep(j, i) { amax(maxd, norm(cc[i] - cc[j])); } amax(ans, sqrt((double)maxd) + 2); } printf("%.10f\n", ans); } return 0; }