#include<bits/stdc++.h>
using namespace std;


typedef complex<double> P;
typedef pair<P,P> L;

const double EPS = 1e-8;

double dot(P a, P b){
  return a.real() * b.real() + a.imag() * b.imag();
}
double cross(P a,P b){
  return a.real() * b.imag() - a.imag() * b.real();
}

struct Circle {
  P c;
  double r;
  Circle( P c=P(0,0), double r=0):c(c),r(r){}
};

P proj( P p, L l ) {
  return l.first + dot( p-l.first, l.second-l.first ) /
    norm( l.second - l.first ) * (l.second - l.first );
}

bool isIntersectLS( L l, L s ){
  return cross( l.second - l.first, s.first- l.first ) *
    cross( l.second - l.first, s.second - l.first ) < EPS;
}

bool isIntersectSP(L s, P p){
  return abs( s.first - p ) + abs( s.second - p ) - abs( s.second - s.first ) < EPS;
}



vector<P> getIntersectCS( Circle c, L s ) {
  vector<P> res;
  P h = proj( c.c, s );
  double d = abs( c.c - h );
  if( d > c.r + EPS );
  else if( d > c.r - EPS ) {
    if( isIntersectSP( s, h ) )
      res.push_back( h );
  } else {
    P v = s.second - s.first;
    v = (sqrt( c.r * c.r - d*d ) / abs( v ) ) * v;
    if( isIntersectSP( s, h+v ) ) res.push_back( h+v );
    if( isIntersectSP( s, h-v ) ) res.push_back( h-v );
    return res;
  }
}

vector<P> tangent( Circle c, P p ) {
  vector<P> res;
  double a = abs( p - c.c );
  if( a < c.r - EPS );
  else if( a < c.r + EPS ) res.push_back( p );
  else {
    double b = sqrt( a*a - c.r*c.r );
    double psi = arg( p - c.c );
    double phi = M_PI - acos( b/a );
    res.push_back( p + b * P(cos(psi+phi), sin(psi+phi)) );
    res.push_back( p + b * P(cos(psi-phi), sin(psi-phi)) );
  }
  return res;    
}

vector<L> tangentCC( Circle p, Circle q ) {
  double pr = p.r, qr = q.r;
  P pc = p.c, qc = q.c;
  double d = abs( pc - qc ), dr = abs( pr - qr ), sr = abs( pr + qr );

  vector<L> ret;
  if( d > sr ) {
    P cp = ( pc * qr + qc *pr ) / sr;
    vector<P> pts = tangent(p,cp), qts = tangent(q,cp);
    ret.push_back( L(pts[0],qts[0]) );
    ret.push_back( L(pts[1],qts[1]) );
  } else if( abs( d - sr ) < EPS ) {
    P cp = p.c + (q.c-p.c)*(abs(q.c-p.c)/2.0);
    P vp = (q.c-p.c); vp = P( vp.imag(), -vp.real() );    
    ret.push_back( L(cp, cp+vp) );
    return ret;
  }

  if( d > dr ) {
    if( abs( pr - qr ) < EPS ) {
      P v = (qc - pc) / d;
      v *= P(0,1);
      ret.push_back( L(pc + v, qc + v) );
      ret.push_back( L(pc - v, qc - v) );
    } else {
      P cp = pc + (qc - pc) * pr / (pr - qr);
      vector<P> pts = tangent( p, cp ), qts = tangent( q, cp );
      ret.push_back( L(pts[0], qts[0]) );
      ret.push_back( L(pts[1], qts[1]) );
    }
  } else if ( abs(d - dr) < EPS ) {
    P cp = (qc - pc) * pr / (pr - qr);
    ret.push_back( L(cp,cp) );
  }
  return ret;
}


P crossPoint( L l, L m ){
  double A = cross( l.second - l.first, m.second - m.first );
  double B = cross( l.second - l.first, l.second - m.first );
  if( abs( A ) < EPS && abs( B ) < EPS ) return m.first;
  else if( abs( A ) >= EPS ) return m.first + B / A * (m.second - m.first);
}

bool isInCircle( Circle c, P p ){
  if( abs(c.c-p) < c.r - EPS ) return true;
  return false;
}

bool isCheck( L &s, vector<P> &ps, double h ){
  //cout << s.first <<" "<<s.second << endl;
  for( P &p : ps ){   
    Circle c = Circle( p, h );
    //cout << c.c << " : " << abs(c.c-proj( c.c, s )) << endl;
    if( getIntersectCS( c, s ).size() > 1 ){
      return false;      
    }
    if( isInCircle( c, s.first ) || isInCircle( c, s.second ) ) return false;
    
  }
  return true;
}

struct uni {
  int d[511];
  uni(){
    memset( d,-1,sizeof( d ) );
  }
  int find(int a){ return d[a]<0?a:(d[a]=find(d[a])); }
  bool merge(int a,int b){
    a = find(a); b = find(b);
    if( a == b ) return false;
    if( d[a] > d[b] ) swap(a,b);
    d[a] += d[b]; d[b] = a;
    return true;
  }
  bool same(int a,int b){
    return find(a)==find(b);
  }  
};

int W,H;
int N;
int main(){
  
  cin >> W >> H >> N;
  vector<P> p(N);
  for(int i=0;i<N;i++){
    int x,y;
    cin >> x >> y; p[i] = P(x,y);
  }

  double st = 0.0, ed = 1e9;
  for(int ttt=0;ttt<50;ttt++){
    double h = (st+ed)/2.0;
    uni U;
    for(int i=0;i<N;i++){
      if( p[i].real() < h - EPS )
        U.merge( i, N );
      if( abs(W-p[i].real()) < h-EPS )
        U.merge( i, N+1 );
    }
    
    vector<L> sk;
    for(int i=0;i<N;i++){
      for(int j=0;j<N;j++){
        if( i==j ) continue;
        if( abs( p[i] - p[j] ) < 2.0 * h - EPS )
          U.merge( i,j );
      }
    }
    if( U.same( N,N+1 ) )
      ed = h;        
    else
      st = h;      
  }
  printf("%.3lf\n",ed);
  
}

Measured memory_bytes: 3292