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: Accepted)

#define _USE_MATH_DEFINES

#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <unordered_map> 
#include <unordered_set>
#include <functional>
#include <bitset>

using namespace std;

typedef pair<long long int, long long int> P;
typedef tuple<int, int, int> T;

long long int INF = 1e18;
long long int MOD = 1e9 + 7;

double EPS = 1e-10;

double add(double a, double b){
	if(abs(a + b) < EPS * (abs(a) + abs(b))){
		return 0;
	}
	return a + b;
}

struct Pd{
	double x, y;
	Pd(){}
	Pd(double x, double y) : x(x), y(y){}
	Pd operator + (Pd p){
		return Pd(add(x, p.x), add(y, p.y));
	}
	Pd operator - (Pd p){
		return Pd(add(x, -p.x), add(y, -p.y));
	}
	Pd operator * (double d){
		return Pd(x * d, y * d);
	}
	double dot(Pd p){
		return add(x * p.x, y * p.y);
	}
	double det(Pd p){
		return add(x * p.y, -y * p.x);
	}
};

pair<Pd, double> min_ball(vector<Pd> ps) {
    const int n = ps.size();
 
    //assert(n >= 1); // n < 1 の場合、エラーメッセージを出力して異常終了
    if (n == 1) {
        return {ps[0], 0.0};
    }

    using circle = pair<Pd, double>;
 
    auto make_circle_3 = [](Pd a, Pd b, Pd c) -> circle {
        double A = (b - c).dot(b - c), B = (c - a).dot(c - a), C = (a - b).dot(a - b), S = Pd(b - a).det(c - a);
        Pd p = (a * A * (B + C - A) + b * B * (C + A - B) + c * C * (A + B - C)) * (1.0 / (4 * S * S));
        double r2 = (p - a).dot(p - a);
        return {p, r2};
    };
 
    auto make_circle_2 = [](Pd a, Pd b) -> circle {
        Pd c = (a + b) * 0.5;
        double r2 = (a - c).dot(a - c);
        return {c, r2};
    };
 
    auto in_circle = [](Pd a, circle c) -> bool {
        return (a - c.first).dot(a - c.first) <= c.second + EPS;
    };

    circle c = make_circle_2(ps[0], ps[1]);

    for (int i = 2; i < n; ++i) {
        if (!in_circle(ps[i], c)) {
            c = make_circle_2(ps[0], ps[i]);
            for (int j = 1; j < i; ++j) {
                if (!in_circle(ps[j], c)) {
                    c = make_circle_2(ps[i], ps[j]);
                    for (int k = 0; k < j; ++k) {
                        if (!in_circle(ps[k], c)) {
                            c = make_circle_3(ps[i], ps[j], ps[k]);
                        }
                    }
                }
            }
        }
    }
    return c;
}

int main(){
	int N;
	cin >> N;
	vector<Pd> v;
	for(int i = 0; i < N; i++){
		Pd p = Pd();
		cin >> p.x >> p.y;
		v.push_back(p);
	}
	printf("%.15f\n", sqrt(min_ball(v).second));
	return 0;
}