#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; class UnionFindTree { private: int N; int *rootnum; int *rank; int *unionnum; public: UnionFindTree(int n){ /*0からn-1までの要素をunionとしてもつ*/ N = n; rootnum = new int[N]; rank = new int[N]; unionnum = new int[N]; for( int i = 0 ; i < N ; i++ ){ rootnum[i] = i; rank[i] = 0; unionnum[i] = 1; } } int Find( int j ){ if( rootnum[j] == j ){ return j; } else{ return rootnum[j] = Find(rootnum[j]); } } void Union( int i , int j ){ int x = Find(i); int y = Find(j); if( x == y ) return; N--; if( rank[x] < rank[y] ){ rootnum[y] = x; unionnum[x] += unionnum[y]; }else{ rootnum[x] = y; unionnum[y] += unionnum[x]; if( rank[x]==rank[y] ) rank[x]++; } } int Num( int j ){ /*与えられた要素の入っている集合の要素数を答える*/ int x = Find(j); return unionnum[x]; } int UnionNum(){ /*集合の数を答える*/ return N; } ~UnionFindTree(){ delete rootnum; delete rank; delete unionnum; } }; long long product( pair p1, pair p2, pair p3 ){ pair v1 = make_pair( p2.first-p1.first, p2.second-p1.second); pair v2 = make_pair( p3.first-p1.first, p3.second-p1.second); return v1.first*(long long)v2.second-v1.second*(long long)v2.first; } vector< pair > convex_hull( vector > &V){ sort(V.begin(),V.end()); if( V.size() <=2 ) return V; int size = V.size(); vector > ret(size*2); int retlen=0; for( int i = 0 ; i = 2 && product( ret[retlen-2],ret[retlen-1],V[i] ) >= 0 ) retlen--; ret[retlen++]=V[i]; } for( int i = size-1 ; i > 0 ; i-- ){ while( retlen >= 2 && product( ret[retlen-2],ret[retlen-1],V[i] ) >= 0 ) retlen--; ret[retlen++]=V[i]; } ret.resize(retlen); return ret; } pair points[120001]; vector< pair > V[120001]; int main(){ int N; cin >> N; map< pair, int> m; UnionFindTree uft(N); for( int i = 0 ; i < N ; i++ ){ V[i].clear(); cin >> points[i].first >> points[i].second; m[points[i]]=i+1; } if( N == 0 ){ printf("%.10f\n",1.0); return 0; } for( int i = 0 ; i < N ; i++ ){ int x = points[i].first; int y = points[i].second; for( int x2 = x ; x2 <= x+10; x2++ ){ for( int y2 = y-10; y2 <= y+10; y2++ ){ if( x==x2 && y==y2) continue; if( (x2-x)*(x2-x)+(y2-y)*(y2-y) > 100 ) continue; if( m[make_pair(x2,y2)]>0){ int ind = m[make_pair(x2,y2)]; uft.Union(i,ind-1); } } } } for( int i = 0 ; i < N ; i++ ){ V[uft.Find(i)].push_back(points[i]); } long long maxDist = 0; for( int i = 0 ; i > convPoints = convex_hull(V[i]); for( int j = 0 ; j < (int) convPoints.size(); j ++ ){ for( int k = j+1 ; k < (int) convPoints.size(); k++ ){ long long dx = convPoints[j].first-convPoints[k].first; long long dy = convPoints[j].second-convPoints[k].second; maxDist = max(maxDist,dx*dx+dy*dy); } } } printf("%.10f\n",2.0+sqrt((double)maxDist)); return 0; }