#include using namespace std; vector> convex_hull(vector> V) { auto cross = [](pair a, pair b, pair c) { b.first -= a.first; c.first -= a.first; b.second -= a.second; c.second -= a.second; return (long long)b.first * c.second - (long long)b.second * c.first; }; int n = (int)V.size(); sort(V.begin(), V.end(), [](pair a, pair b) { return a.first != b.first ? a.first < b.first : a.second < b.second; }); if (n == 1) return V; int k = 0; vector> ret(n * 2); for (int i = 0; i < n; i++) { while (k > 1 && cross(ret[k - 1], V[i], ret[k - 2]) >= 0) k--; ret[k++] = V[i]; } for (int i = n - 2, t = k; i >= 0; i--) { while (k > t && cross(ret[k - 1], V[i], ret[k - 2]) >= 0) k--; ret[k++] = V[i]; } ret.resize(k - 1); return ret; } struct UnionFind { vector data; UnionFind(int n) { data.assign(n, -1); } bool unite(int x, int y) { x = root(x), y = root(y); if (x == y) return (false); if (data[x] > data[y]) swap(x, y); data[x] += data[y]; data[y] = x; return (true); } int root(int k) { if (data[k] < 0) return (k); return (data[k] = root(data[k])); } bool same(int x, int y) { return root(x) == root(y); } int size(int k) { return (-data[root(k)]); } }; vector B[2010][2010]; int main() { int N; vector> V; cin >> N; for (int i = 0; i < N; i++) { int x, y; cin >> x >> y; V.push_back({x + 10000, y + 10000}); } if (N == 0) { cout << 1 << endl; return 0; } UnionFind uf(N); auto check = [&](int a, int b) { int xa = V[a].first, ya = V[a].second, xb = V[b].first, yb = V[b].second; return abs(xa - xb) * abs(xa - xb) + abs(ya - yb) * abs(ya - yb) <= 100; }; for (int i = 0; i < N; i++) { int& x = V[i].first; int& y = V[i].second; int X = x / 10 + 1; int Y = y / 10 + 1; for (int dx = -1; dx <= 1; dx++) { for (int dy = -1; dy <= 1; dy++) { for (auto& n : B[X + dx][Y + dy]) { if (check(i, n)) uf.unite(i, n); } } } B[X][Y].push_back(i); } map> V2; for (int i = 0; i < N; i++) { if (!V2.count(uf.root(i))) { V2[uf.root(i)].reserve(uf.size(i)); } V2[uf.root(i)].push_back(i); } auto dist = [](const pair& a, const pair& b) { return sqrt(abs(a.first - b.first) * abs(a.first - b.first) + abs(a.second - b.second) * abs(a.second - b.second)); }; double ans = 0; for (auto& p : V2) { vector> V3; V3.reserve(p.second.size()); for (auto& a : p.second) V3.push_back({V[a].first, V[a].second}); V3 = convex_hull(V3); for (auto& a : V3) for (auto& b : V3) ans = max(ans, dist(a, b) + 2); } cout << fixed << setprecision(9) << ans << endl; }