best[i]=slove(tp[i]);
}
double step=max(X,Y)/sqrt(1.0*n);
while(step>1e-3){
for(int i=0;i<15;i++){
Point cur,pre=tp[i];
for(int j=0;j<35;j++){
double angle=(rand()%1000+1)/1000.0*2*pi;
cur.x=pre.x+cos(angle)*step;
cur.y=pre.y+sin(angle)*step;
if(!cur.check()) continue;
double tmp=slove(cur);
if(tmp>best[i]){
tp[i]=cur;
best[i]=tmp;
}
}
step*=0.85;
}
int idx=0;
double ans=0;
for(int i=0;i<15;i++){
if(best[i]>ans){
ans=best[i];
idx=i;
}
}
printf("The safest point is (%.1f, %.1f).\n",tp[idx].x,tp[idx].y);
}
return 0;
}