#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define N_MAX 1000 using namespace std; class union_find_tree { private: int *par; int *rank; public: union_find_tree(int n); int root(int x); void unite(int x, int y); bool same(int x, int y); }; union_find_tree::union_find_tree(int n) { par = new int[n]; rank = new int[n]; for (int i = 0; i < n; i++) { par[i] = i; rank[i] = 0; } } int union_find_tree::root(int x) { if (par[x] == x) { return x; } else { return par[x] = root(par[x]); } } void union_find_tree::unite(int x, int y) { x = root(x); y = root(y); if (x == y) { return; } if (rank[x] < rank[y]) { par[x] = y; } else { par[y] = x; if (rank[x] == rank[y]) { rank[x]++; } } } bool union_find_tree::same(int x, int y) { return root(x) == root(y); } int main(void) { int N, X[N_MAX], Y[N_MAX]; cin >> N; if (N == 0) { printf("1\n"); return 0; } for (int i = 0; i < N; i++) { cin >> X[i] >> Y[i]; } union_find_tree uft(N); for (int i = 0; i < N; i++) { for (int j = i + 1; j < N; j++) { int dX = X[i] - X[j], dY = Y[i] - Y[j]; if (dX*dX + dY*dY <= 10*10) { uft.unite(i, j); } } } double d = 0; for (int i = 0; i < N; i++) { for (int j = i + 1; j < N; j++) { if (uft.same(i, j)) { d = max(d, sqrt(pow(X[i] - X[j], 2) + pow(Y[i] - Y[j], 2))); } } } printf("%lf\n", d + 2); return 0; }