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: Time Limit Exceeded)

#pragma GCC optimize("O3")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target ("avx")
#define io_init cin.tie(0);ios::sync_with_stdio(0);cout<<setprecision(10)
#include <bits/stdc++.h>
constexpr int INF = 2147483647;
constexpr long long int INF_LL = 9223372036854775807;
constexpr int MOD = 1000000007;
constexpr double PI = 3.14159265358979323846;
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;

double dist(pair<double, double> a, pair<double, double>b) {
	return sqrt((a.first - b.first) * (a.first - b.first) + (a.second - b.second) * (a.second - b.second));
}

pair<double, double> calc_c(pair<double, double> a, pair<double, double>b, pair<double, double>c, double & r) {
	pair<double, double> e, f, g;
	e.first = (a.first + b.first) / 2;
	e.second = (a.second + b.second) / 2;
	f.first = (b.first + c.first) / 2;
	f.second = (b.second + c.second) / 2;
	double tan_a, tan_b;
	tan_a = tan(atan((b.second - a.second) / (b.first - a.first)) + PI / 2);
	tan_b = tan(atan((c.second - b.second) / (c.first - b.first)) + PI / 2);
	g.first = (e.second - f.second - e.first * tan_a + f.first * tan_b) / (tan_b - tan_a);
	g.second = e.second - (e.first - g.first) * tan_a;
	r = dist(a, g);
	return g;
}

pair<double, double> calc_c(pair<double, double> a, pair<double, double>b,double &r) {
	pair<double, double> g;
	g.first = (a.first + b.first) / 2;
	g.second = (a.second + b.second) / 2;
	r = dist(a, g);
	return g;
}

bool is_inner(pair<double, double> c, pair<double, double>p, double r) {
	return dist(c, p) <= r;
}

int main() {
	io_init;
	int N;
	cin >> N;
	vector<pair<double, double>> a(N);
	for (int i = 0; i < N; i++) {
		cin >> a[i].first >> a[i].second;
	}
	double ans = INF;
	for (int i = 0; i < N; i++) {
		for (int j = 0; j < N; j++) {
			for (int k = 0; k < N; k++) {
				if (i == j || j == k || k == i) continue;
				double r;
				auto c = calc_c(a[i], a[j], a[k], r);
				bool f = false;
				for (int s = 0; s < N; s++) {
					if (!is_inner(c, a[s], r))f = true;
				}
				if (!f)ans = min(ans, r);
			}
		}
	}
	for (int i = 0; i < N; i++) {
		for (int j = 0; j < N; j++) {
			if (i == j) continue;
			double r;
			auto c = calc_c(a[i], a[j], r);
			bool f = false;
			for (int k = 0; k < N; k++) {
				if (!is_inner(c, a[k], r))f = true;
			}
			if (!f)ans = min(ans, r);
		}
	}
	cout << ans << endl;
}