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: Wrong Answer)

import math


N = int(input())
x = [0] * N
y = [0] * N
xy = []
for i in range(N):
    # x[i], y[i] = map(int, input().split())
    xy.append(list(map(int, input().split())))


def signed_area(p1, p2, p3):
    area = (p2[0] - p1[0]) * (p3[1] - p1[1])\
            - (p3[0] - p1[0]) * (p2[1] - p1[1])
    return area/2


def convex_hull(p_list):
    p_sort = []
    for i in p_list:
        p_sort.append(i[0])

    # x座標が最小のものをリストの先頭に配置。
    min_index = p_sort.index(min(p_sort))
    min_p = p_list.pop(min_index)
    p_list.insert(0, min_p)

    # 座標最小の点と他の点との角度順にソート ソートアルゴリズムに選択の余地が有る。
    p_length = len(p_list)
    count = 0
    index = 0
    while True:
        count += 1
        index += 1

        area_sign = signed_area(p_list[0], p_list[index], p_list[index + 1])

        # 符号付き面積が負ならば点を入れ替え
        if area_sign < 0:
            p_list[index], p_list[index + 1] = p_list[index + 1], p_list[index]
            count = 0

        if count == p_length - 1:
            break

        if index == p_length - 2:
            index = 0

    # 凹部の点を削除する。
    index = -1
    count = 0
    while True:
        index += 1
        count += 1

        area_sign = signed_area(p_list[index],
                                p_list[index + 1],
                                p_list[index + 2])
        if area_sign < 0:
            del p_list[index + 1]
            count = 0

        if count == len(p_list):
            break

        if index >= len(p_list) - 3:
            index = -1
    return p_list


def euc(p1, p2):
    return (p1[0]-p2[0])**2 + (p1[1]-p2[1])**2


def find_max_euc(xy):
    ans = []
    max_dis = 0
    n = len(xy)
    for i in range(n):
        for j in range(n):
            dis = math.sqrt(euc(xy[j], xy[i]))
            if dis > max_dis:
                max_dis = dis
                ans = [xy[j], xy[i]]
    return ans


if len(xy) == 2:
    dis = math.sqrt(euc(xy[0], xy[1]))
    print(dis/2)
else:
    xy = convex_hull(xy)
    xy = find_max_euc(xy)
    dis = math.sqrt(euc(xy[0], xy[1]))
    print(dis/2)