Problem:
Score : 600 points

Problem Statement

Given are N points (x_i, y_i) in a two-dimensional plane.

Find the minimum radius of a circle such that all the points are inside or on it.

Constraints

2 \leq N \leq 50

0 \leq x_i \leq 1000

0 \leq y_i \leq 1000

The given N points are all different.

The values in input are all integers.

Input

Input is given from Standard Input in the following format:

N
x_1 y_1
:
x_N y_N

Output

Print the minimum radius of a circle such that all the N points are inside or on it.

Your output will be considered correct if the absolute or relative error from our answer is at most 10^{-6}.

Sample Input 1

2
0 0
1 0

Sample Output 1

0.500000000000000000

Both points are contained in the circle centered at (0.5,0) with a radius of 0.5.

Sample Input 2

3
0 0
0 1
1 0

Sample Output 2

0.707106781186497524

Sample Input 3

10
10 9
5 9
2 0
0 0
2 7
3 3
2 5
10 0
3 7
1 9

Sample Output 3

6.726812023536805158

If the absolute or relative error from our answer is at most 10^{-6}, the output will be considered correct.

Solution in C++14 (GCC 5.4.1) (judge verdict: Wrong Answer)

// https://s3.amazonaws.com/codechef_shared/download/Solutions/JAN17/Setter/CHEFCIRC.cpp
#include <stdio.h>
#include <algorithm>
#include <assert.h>
#include <set>
#include <map>
#include <complex>
#include <iostream>
#include <time.h>
#include <stack>
#include <stdlib.h>
#include <memory.h>
#include <bitset>
#include <math.h>
#include <string>
#include <string.h>
#include <queue>
#include <vector>

using namespace std;

const int MaxN = 1e5 + 10;
const int MOD = 1e9 + 7;
const int INF = 1e9;

pair < double, double > p[MaxN];
pair < double, char > all[MaxN];
int n, k;

bool can(double rad) {
  int res = 1;
  for (int i = 1; i <= n && res < k; ++i) {
    int c = 1, sz = 0;
    for (int j = 1; j <= n; ++j) {
      if (i == j) {
        continue;
      }
      double d = hypot(p[i].first - p[j].first, p[i].second - p[j].second);
      if (d / 2 > rad) {
        continue;
      }
      pair < double, double > v = make_pair((p[j].first - p[i].first) / d, (p[j].second - p[i].second) / d);
      double l1 = d / 2;
      double l2 = sqrt(rad * rad - l1 * l1);
      l1 /= rad;
      l2 /= rad;
      pair < double, double > p1 = make_pair(v.first * l1 + v.second * l2, v.second * l1 - v.first * l2);
      pair < double, double > p2 = make_pair(v.first * l1 - v.second * l2, v.second * l1 + v.first * l2);
      double ang1 = atan2(p1.second, p1.first);
      double ang2 = atan2(p2.second, p2.first);
      if (ang1 > ang2) {
        c++;
      }
      all[sz++] = make_pair(ang1, 1);
      all[sz++] = make_pair(ang2 + 1e-10, -1);
    }
    sort(all, all + sz);
    for (int j = 0; j < sz; ++j) {
      c += all[j].second;
      if (res < c) {
        res = c;
      }
    }
  }
  return res >= k;
}

int main() {
//  freopen("input.txt", "r", stdin);
  cin >> n;
  k = n;
  for (int i = 1; i <= n; ++i) {
    cin >> p[i].first >> p[i].second;
  }
  random_shuffle(p + 1, p + n + 1);
  double l = 0, r = 1e4;
  for (int it = 0; it < 22; ++it) {
    double m = (l + r) / 2;
    if (can(m)) {
      r = m;
    } else {
      l = m;
    }
  }
  cout.precision(10);
  cout << fixed << (l + r) / 2.0 << '\n';
  return 0;
}