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 5.4.1) (judge verdict: Time Limit Exceeded)

#pragma GCC optimize("O3")
#pragma GCC target("avx")
#pragma GCC optimize("unroll-loops")
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <stdbool.h>
#define LL long long
#define DB double
#define MIN(x,y) ((x)<(y)?(x):(y))
#define MAX(x,y) ((x)<(y)?(y):(x))
#define FOR(i,a,n) for(i=a;i<n;i++)
#define rep(i,n) FOR(i,0,n)
#define MOD 1000000007
//#define MOD 998244353
#define INF 1145141919810364364
#define PI 3.14159265358979
#define ERR 0.00000000000001
#define NUM 200010

void swap(LL* a,LL* b){LL tmp=*a;*a=*b;*b=tmp;}
void Yn(LL a){if(a)printf("Yes\n");else printf("No\n");}
void YN(LL a){if(a)printf("YES\n");else printf("NO\n");}
LL pwmn(LL a,LL n){LL ans=1;while(ans<a)ans*=n;return ans;}
LL GCD(LL a,LL b){LL c=1,tmp=MAX(a,b);b=MIN(a,b);a=tmp;while(c!=0){c=a%b;a=b;b=c;}return a;}
LL LCM(LL a,LL b){return a*b/GCD(a,b);}
int lcmp(const void* a,const void* b){if(*(LL*)a>*(LL*)b)return 1;if(*(LL*)a<*(LL*)b)return -1;return 0;}
int lcmpr(const void* a,const void* b){if(*(LL*)a>*(LL*)b)return -1;if(*(LL*)a<*(LL*)b)return 1;return 0;}
int ccmp(const void* a,const void* b){return *(char*)a-*(char*)b;}
int ccmpr(const void* a,const void* b){return *(char*)b-*(char*)a;}
int scmp(const void* a,const void* b){return strcmp((char*)a,(char*)b);}
int scmpr(const void* a,const void* b){return strcmp((char*)b,(char*)a);}
LL mod(LL a,LL m){if(a<0)return a%m+m;else return a%m;}
LL DIV(LL a,LL d){LL m=MOD,x=1,y=0,k;while(m){k=d/m;d-=k*m;swap(&m,&d);x-=k*y;swap(&x,&y);}return mod(a*mod(x,MOD),MOD);}
LL POW(LL a,LL n){LL ans=1;while(n>0){if(n&1)ans=ans*a%MOD;a=a*a%MOD;n>>=1;}return ans;}
LL fact[NUM],finv[NUM],inv[NUM];
void comi(){LL i;fact[0]=fact[1]=1;finv[0]=finv[1]=1;inv[1]=1;FOR(i,2,NUM){fact[i]=fact[i-1]*i%MOD;inv[i]=MOD-inv[MOD%i]*(MOD/i)%MOD;finv[i]=finv[i-1]*inv[i]%MOD;}}
LL com(LL n,LL k){if(n<k||n<0||k<0)return 0;return fact[n]*(finv[k]*finv[n-k]%MOD)%MOD;}

DB dist(DB x1,DB y1,DB x2,DB y2){return sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));}
void eqd(DB* vx1,DB* vy1,DB* vx2,DB* vy2,DB x1,DB y1,DB r1,DB x2,DB y2,DB r2){
  DB d=dist(x1,y1,x2,y2);
  if(d<ERR)*vx1=x1,*vy1=y1,*vx2=x2,*vy2=y2;
  else if(d-r1-r2>ERR)*vx1=-1,*vy1=-1,*vx2=-1,*vy2=-1;
  else if(r1+r2-d>ERR){
    DB c=(r1*r1+d*d-r2*r2)/(2*r1*d),d1=r1*c,x=x1+(x2-x1)*d1/d,y=y1+(y2-y1)*d1/d,h=sqrt(r1*r1-d1*d1);
    *vx1=x-(y2-y1)*h/d,*vy1=y+(x2-x1)*h/d,*vx2=x+(y2-y1)*h/d,*vy2=y-(x2-x1)*h/d;
  }
  else *vx1=x1+(x2-x1)*r1/(r1+r2),*vy1=y1+(y2-y1)*r1/(r1+r2),*vx2=*vx1,*vy2=*vy1;
}

int main(){
  LL N,i,j,k,l,flag;
  DB min=0-ERR,max=720.0,mid;
  scanf("%lld",&N);
  LL x[N],y[N];
  FOR(i,0,N)scanf("%lld%lld",&x[i],&y[i]);
  while(max-min>ERR){
    mid=(max+min)/2;
      FOR(i,0,N){
        FOR(j,i+1,N){
          DB nx[2],ny[2];
          eqd(&nx[0],&ny[0],&nx[1],&ny[1],x[i],y[i],mid,x[j],y[j],mid);
          FOR(l,0,2){
          flag=0;
          FOR(k,0,N)if(dist(x[k],y[k],nx[l],ny[l])>mid+ERR){
            flag=1;break;
          }
          if(flag==0)break;
        }
        if(flag==0)break;
      }if(flag==0)break;
    }
    if(flag==0)max=mid;
    else min=mid;
  }

  printf("%.10f\n",max);
	return 0;
}