1 /**************************************************************
2 Problem: 3007
3 User: Tunix
4 Language: C++
5 Result: Accepted
6 Time:1176 ms
7 Memory:72104 kb
8 ****************************************************************/
9
10 //Huce #3 A
11 #include<cmath>
12 #include<queue>
13 #include<vector>
14 #include<cstdio>
15 #include<cstdlib>
16 #include<cstring>
17 #include<iostream>
18 #include<algorithm>
19 #define rep(i,n) for(int i=0;i<n;++i)
20 #define F(i,j,n) for(int i=j;i<=n;++i)
21 #define D(i,j,n) for(int i=j;i>=n;--i)
22 using namespace std;
23
24 int getint(){
25 int v=0,sign=1; char ch=getchar();
26 while(ch<‘0‘||ch>‘9‘) {if (ch==‘-‘) sign=-1; ch=getchar();}
27 while(ch>=‘0‘&&ch<=‘9‘) {v=v*10+ch-‘0‘; ch=getchar();}
28 return v*sign;
29 }
30 typedef long long LL;
31 const int N=3010,INF=~0u>>2;
32 const double eps=1e-5;
33 /*******************tamplate********************/
34 struct Boss{
35 int x,y;
36 Boss(){}
37 Boss(int x,int y):x(x),y(y){}
38 void read(){scanf("%d%d",&x,&y);}
39 }boss[N];
40 double inf = 1 << 25,g[N][N],f[N];
41 int n,row,line;
42 double dis(Boss a,Boss b){
43 double x,y;
44 x=a.x-b.x; y=a.y-b.y;
45 return sqrt(x*x+y*y);
46 }
47 void build(){
48 F(i,1,n+4) F(j,1,n+4) g[i][j]=inf;
49 F(i,1,n) F(j,i+1,n)
50 g[i][j]=g[j][i]=dis(boss[i],boss[j])/2;
51 F(i,1,n){
52 g[n+1][i]=boss[i].y-1;
53 g[n+2][i]=row-boss[i].x;
54 g[i][n+3]=line-boss[i].y;
55 g[i][n+4]=boss[i].x-1;
56 }
57 }
58
59 bool vis[N];
60 double solve(){
61 memset(vis,0,sizeof vis);
62 F(i,1,n+4) f[i]=inf;
63 f[n+1]=f[n+2]=0;
64 vis[n+1]=vis[n+2]=1;
65 double mn; int l;
66 while(1){
67 mn=inf; l=-1;
68 F(i,1,n+4) if (vis[i] && f[i]<mn){
69 mn=f[i]; l=i;
70 }
71 if (l==-1) break;
72 F(i,1,n+4)
73 if (max(g[l][i],f[l])<f[i]){
74 f[i]=max(g[l][i],f[l]);
75 vis[i]=1;
76 }
77 vis[l]=0;
78 }
79 return min(f[n+3],f[n+4]);
80 }
81 int main(){
82 #ifndef ONLINE_JUDGE
83 freopen("input.txt","r",stdin);
84 // freopen("output.txt","w",stdout);
85 #endif
86 n=getint(); row=getint(); line=getint();
87 F(i,1,n) boss[i].read();
88 double ans=inf;
89 F(i,1,n){
90 ans=min(ans,dis(Boss(1,1),boss[i]));
91 ans=min(ans,dis(Boss(row,line),boss[i]));
92 //用起始位置和结束位置更新答案
93 }
94 build();
95 ans=min(ans,solve());
96 printf("%.2lf\n",ans);
97 return 0;
98 }