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 Ruby (2.3.3) (judge verdict: Accepted)

# n個の点全てを含む円のうち半径が最小である円の
# 中心座標と半径を求める
class SolvCircle

    LOOP_MAX = 1000

    # 移動距離がこの値以下になったら処理を終了させる
    CONVRGV = 1.0e-16

    #
    #=== 円の中心座標と半径を求める
    #
    #_pt_x_ :: n個の点のx座標の配列
    #_pt_y_ :: n個の点のy座標の配列
    # 
    #返り値::配列を返す。[中心点のx座標, 中心点のy座標, 円の半径]
    #
    def solv_circle(pt_x, pt_y)
        mv_rate  = 0.5 # 移動係数
        max_dist = 0.0 # 中心点から最遠点までの距離
        cx       = 0.0 # 中心点のx座標。最初は仮に0とし、更新していく。
        cy       = 0.0 # 中心点のy座標。最初は仮に0とし、更新していく。
        k        = 0
        cvgflg   = false

        while (cvgflg == false)

            LOOP_MAX.times { |t|
                # 仮中心点からの最遠点を求める
                max_dist = 0.0
                pt_x.length.times { |i|
                    dist = distance(cx, cy, pt_x[i], pt_y[i])
                    if (dist > max_dist)
                        max_dist = dist
                        k        = i
                    end
                }

                # mv_rateに応じて、仮中心点を更新する移動距離を求める。
                dx = (pt_x[k] - cx) * mv_rate
                dy =  (pt_y[k] - cy) * mv_rate
                dist = Math.sqrt(dx ** 2 + dy **2 )
                
                # 仮中心点を更新する。
                cx += dx
                cy += dy

                # 移動距離が境界値を下回っていればループを抜ける
                if (dist <= CONVRGV)
                    cvgflg = true
                    break
                end
            }

            mv_rate /= 2.0 # 移動係数が1.5を下回ってくるとTLEとなりやすい。
        end

        return [cx, cy, max_dist]
    end

    #
    #=== 二点の距離を求める
    #
    def distance(x1, y1, x2, y2)
        dx = x2 - x1
        dy = y2 - y1
        Math.sqrt(dx * dx + dy * dy)
    end
end

N = gets.to_i
x = Array.new(N)
y = Array.new(N)
N.times{|i| x[i],y[i] = gets.split.map(&:to_i)}

sc = SolvCircle.new
ans = sc.solv_circle(x, y)
puts ans[2]