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 Python (3.4.3) (judge verdict: Runtime Error)

class Circle():
    # 中心p、半径rの円
    def __init__(self, p, r):
        self.p = p
        self.r = r

    def contain(self, q):
        # 点qを含むか判定
        px, py = self.p
        qx, qy = q
        return (px-qx)**2+(py-qy)**2 <= self.r**2


def enclose(P):
    # 点のリストPの最小包含円
    n = len(P)
    if n == 2:
        ax, ay = P[0]
        bx, by = P[1]
        r = ((ax-bx)**2+(ay-by)**2)**0.5/2
        p = ((ax+bx)/2, (ay+by)/2)
        return Circle(p, r)
    if n == 3:
        p0, p1, p2 = P[0], P[1], P[2]
        circle0 = enclose([p1, p2])
        circle1 = enclose([p2, p0])
        circle2 = enclose([p0, p1])
        if circle0.contain(p0):
            circle = circle0
        elif circle1.contain(p1):
            circle = circle1
        elif circle2.contain(p2):
            circle = circle2
        else:
            p0x, p0y = p0
            p1x, p1y = p1
            p2x, p2y = p2
            A = p1x*p2x+p1y*p2y
            B = p2x*p0x+p2y*p0y
            C = p0x*p1x+p0y*p1y
            a = A*(B+C-A)
            b = B*(C+A-B)
            c = C*(A+B-C)
            px = (a*p0x+b*p1x+c*p2x)/(a+b+c)
            py = (a*p0y+b*p1y+c*p2y)/(a+b+c)
            r = ((px-p0x)**2+(py-p0y)**2)**0.5/2
            circle = Circle((px, py), r)
        return circle
    for i in range(n-2):
        for j in range(i, n-1):
            for k in range(j, n):
                circle = enclose([P[i], P[j], P[k]])
                if all([circle.contain(P[l]) for l in range(n)]):
                    return circle


n = int(input())
P = []
for i in range(n):
    x, y = map(int, input().split())
    P.append((x, y))
print(enclose(P).r)