#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define FOR(i,a,b) for (int i=(a);i<(b);i++) #define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--) #define REP(i,n) for (int i=0;i<(n);i++) #define RREP(i,n) for (int i=(n)-1;i>=0;i--) #define inf 0x3f3f3f3f #define INF INT_MAX/3 #define PB push_back #define MP make_pair #define ALL(a) (a).begin(),(a).end() #define SET(a,c) memset(a,c,sizeof a) #define CLR(a) memset(a,0,sizeof a) #define pii pair #define pcc pair #define pic pair #define pci pair #define VS vector #define VI vector #define DEBUG(x) cout<<#x<<": "<b?b:a) #define MAX(a,b) (a>b?a:b) #define pi 2*acos(0.0) #define INFILE() freopen("in0.txt","r",stdin) #define OUTFILE()freopen("out0.txt","w",stdout) #define in scanf #define out printf #define ll long long #define ull unsigned long long #define eps 1e-14 #define FST first #define SEC second class union_find { private: vector par; vector rank; public: union_find(int N):par(N), rank(N) { for (int i = 0; i < N; ++i) { par[i] = i; rank[i] = 0; } } int find(int x) { if (par[x] == x) { return x; } else { return par[x] = find(par[x]); } } void unite(int x, int y) { x = find(x); y = find(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 same(int x, int y) { return find(x) == find(y); } }; template struct vector2 { T x; T y; vector2(T x_, T y_) :x(x_), y(y_) {} vector2() :x(0), y(0) {} vector2 operator + (const vector2& right) { return vector2(x + right.x, y + right.y); } vector2 operator - (const vector2& right) { return vector2(x - right.x, y - right.y); } T dot(const vector2& right) { return x*right.x + y*right.y; } T det(const vector2& right) { return (x*right.y) + (-y*right.x); } T dist2(const vector2& right) { return (right.x-x)*(right.x-x) + (right.y-y)*(right.y-y); } T ownDot(const vector2& right) { return x*x+y*y; } }; int main() { int N; cin >> N; vector > P(N); REP(i, N) cin >> P[i].x >> P[i].y; double low = 0.0, high = 10e9*2; REP(count, 100) { double mid = (low + high) / 2.0; union_find uf(N); REP(i, N) REP(j, N) { if (P[i].dist2(P[j]) <= mid*mid) { uf.unite(i, j); } } if (uf.same(0, N - 1)) high = mid; else low = mid; } cout << int((low + high) / 20.0 - eps + 1.0)*10 << endl; return 0; }