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)

# 中心座標と半径を求める
class SolvCircle

	LOOP_MAX = 100

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

	#
	#=== 円の中心座標と半径を求める
	#
	#_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 # 中心点から最遠点までの距離
		xsv      = 0.0 # 中心点のx座標
		ysv      = 0.0 # 中心点のy座標
		cx       = 0.0 # 仮中心点のx座標
		cy       = 0.0 # 仮中心点のy座標
		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
				}

				# 仮の中心点を計算
				cx += (pt_x[k] - xsv) * mv_rate
				cy += (pt_y[k] - ysv) * mv_rate

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

				xsv = cx
				ysv = cy
			}

			mv_rate /= 2.0

		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.chomp!.to_i
ptx = []
pty = []
n.times{
	a,b = gets.chomp!.split(/ /).map(&:to_i)
	ptx.push(a)
	pty.push(b)
}
hoge = SolvCircle.new()
x,y,r = hoge.solv_circle(ptx,pty)
puts r