#include using namespace std; #define REP(i,n) for (int i = 0; i < (n); ++i) #define FOR(i,a,b) for (int i = (a); i <= (b); ++i) #define FORD(i,a,b) for (int i = (a); i >= (b); --i) template T cross_product(const complex &A, const complex &B) { return real(A) * imag(B) - real(B) * imag(A); } template bool clockwise(const complex &A, const complex &B, const complex &C) { return cross_product(B-A, C-A) < 0; } template bool counterclockwise(const complex &A, const complex &B, const complex &C) { return clockwise(C,B,A); } template vector> convex_hull(const vector> &V) { int count = 2; vector Hull(V.size()); REP(i, 2) Hull[i] = i; FOR(i, 2, (int)V.size() - 1) { while (count >= 2 && !counterclockwise(V[Hull[count-2]], V[Hull[count-1]], V[i])) count--; Hull[count++] = i; } vector> res; REP(i, count) res.push_back(V[Hull[i]]); return res; } typedef complex cll; typedef complex cdd; cdd cll_to_cdd(cll A) { return cdd(real(A), imag(A)); } #define maxN 1000005 cll points[maxN]; vector hull; int n; bool cmp(cll A, cll B) { if (real(A) != real(B)) return real(A) > real(B); return imag(A) < imag(B); } double len(cll point, double phi) { return real(point) / cos(phi) + imag(point) / sin(phi); } int main() { while (scanf("%d", &n) == 1) { int maxx=0, maxy=0; REP(i, n) { int x,y; scanf("%d%d", &x, &y); maxx=max(maxx,x); maxy=max(maxy,y); points[i + 1]=cll(x,y); } sort(points + 1, points + n + 1, cmp); points[0] = cll(maxx,0); points[n+1] = cll(0, maxy); hull.clear(); REP(i, n + 2) hull.push_back(points[i]); hull = convex_hull(hull); n = hull.size() - 2; double minlen = -1; FOR(i, 1, n) { // printf("%lld %lld, %lld %lld, %lld %lld\n", real(hull[i-1]), imag(hull[i-1]), real(hull[i]), imag(hull[i]), real(hull[i+1]), imag(hull[i+1])); cdd v1 = cll_to_cdd(hull[i + 1] - hull[i]); cdd v2 = cll_to_cdd(hull[i] - hull[i-1]); double v[4],w[4]; v[0] = M_PI - arg(v1), v[3] = M_PI - arg(v2); REP(iiiii, 50) { v[1] = v[0] * (2.0/3) + v[3] * (1.0/3); v[2] = v[0] * (1.0/3) + v[3] * (2.0/3); FOR(k, 1, 2) { w[k] = len(hull[i], v[k]); // printf("%lf: %lf, %lf: %lf\n", v[1], w[1], v[2], w[2]); } if (w[1] < w[2]) v[3] = v[2]; else v[0] = v[1]; } double nowlen = len(hull[i], (v[0] + v[3]) / 2); if (i == 1 || nowlen < minlen) { minlen = nowlen; } } printf("%.3lf\n", minlen); } return 0; }