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 LuaJIT (2.0.4) (judge verdict: Accepted)

local mma = math.max
local msq = math.sqrt
local n = io.read("*n")
local x, y = {}, {}
for i = 1, n do
  x[i], y[i] = io.read("*n", "*n")
end
local rep = 1000

local tx, ty = 0, 0
local function solvex(px)
  tx = px
  local sq = 0
  for i = 1, n do
    local tmp = (tx - x[i]) * (tx - x[i]) + (ty - y[i]) * (ty - y[i])
    sq = mma(sq, tmp)
  end
  return sq
end

local function triplediv(xmin, xmax, rep, func)
  local left_v, right_v = func(xmin), func(xmax)
  for i = 1, rep do
    local xmid1, xmid2 = (xmin * 2 + xmax) / 3, (xmin + xmax * 2) / 3
    local mid_v1, mid_v2 = func(xmid1), func(xmid2)
    if left_v > mid_v1 then
      if mid_v2 > right_v then
        xmin = xmid2
        left_v = mid_v2
      elseif mid_v1 > mid_v2 then
        xmin = xmid1
        left_v = mid_v1
      else
        xmax = xmid2
        right_v = mid_v2
      end
    else
      if mid_v2 < right_v then
        xmax = xmid1
        right_v = mid_v1
      elseif mid_v1 < mid_v2 then
        xmin = xmid1
        left_v = mid_v1
      else
        xmax = xmid2
        right_v = mid_v2
      end
    end
  end
  return (left_v + right_v) / 2
end

local function solvey(py)
  ty = py
  return triplediv(0, 1000, rep, solvex)
end

local ret = triplediv(0, 1000, rep, solvey)
print(string.format("%.10f", msq(ret)))