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 C++ (GCC 9.2.1) (judge verdict: Wrong Answer)

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
template<typename T> bool chmax(T &a,T b) {if(a<b) {a=b; return true;} return false;}
template<typename T> bool chmin(T &a,T b) {if(a>b) {a=b; return true;} return false;}
#define itn int
#define fi first
#define se second
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;i--)
#define rrep1(i,n) for(int i=(int)(n);i>=1;i--)
#define all(vec) vec.begin(),vec.end()
#define sortt(vec) sort((vec).begin(),(vec).end())
#define rsort(vec) sort((vec).rbegin(), (vec).rend())
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> pll;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pld;
typedef tuple<ll,ll,ll> tlll;
typedef tuple<int,int,int> tiii;
const ll mod=1e9+7;
const int inf=2e9;
const ll lnf=9e18;

int main(){
  cout << fixed << setprecision(15);
  itn n; cin >> n;
  vector<ld> x(n);
  vector<ld> y(n);
  rep(i,n) cin >> x[i] >> y[i]; 
  if(n==2){
    ld cx=(x[0]+x[1])/2;
    ld cy=(y[0]+y[1])/2;
    ld dist=sqrt((cx-x[1])*(cx-x[1])+(cy-y[1])*(cy-y[1]));
    cout << dist << endl;
    return 0;
  }
  ld ans=inf;
  rep(i,n)rep(j,n)rep(k,n)if(i!=j&&j!=k&&k!=i){
    bool f=0;
    if(abs(y[i]-y[j])<(ld)0.1||abs(y[k]-y[j])<(ld)0.1) f=1;
    ld gra1=-(x[i]-x[j])/(y[i]-y[j]);
    ld gra2=-(x[k]-x[j])/(y[k]-y[j]);
    ld cx,cy;
    if(f||abs(gra1-gra2)<(ld)0.0001){
      vector<pld> v(0);
      v.push_back(pld(x[i],y[i]));
      v.push_back(pld(x[j],y[j]));
      v.push_back(pld(x[k],y[k]));
      sortt(v);
      cx=(v[0].fi+v[2].fi)/2;
      cy=(v[0].se+v[2].se)/2;
    }
    else{
      ld a1=(x[i]+x[j])/2;
      ld b1=(y[i]+y[j])/2;
      ld a2=(x[j]+x[k])/2;
      ld b2=(y[j]+y[k])/2;
      ld s=(b2-b1+(a1-a2)*gra2)/(gra1-gra2);
      cx=a1+s;
      cy=b1+s*gra1;
    }
    ld mxdist=0;
    rep(l,n){
      ld dist=sqrt((cx-x[l])*(cx-x[l])+(cy-y[l])*(cy-y[l]));
      chmax(mxdist,dist);
    }
    chmin(ans,mxdist);
  }
  cout << ans << endl;
}