#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9, pi = acos(-1.);
const int N = 1005;
int w, h, n, t, s, p[N * N], q[N];
double l = 0, r = 2e6, m, ang, d[N][N], e[N][N], v[N * N];
struct node {
  double x, y;
  node() {}
  node(double x, double y) : x(x), y(y) {}
  node operator+(const node &A) { return node(x + A.x, y + A.y); }
  node operator-(const node &A) { return node(x - A.x, y - A.y); }
  node operator*(const double &A) { return node(x * A, y * A); }
  node operator/(const double &A) { return node(x / A, y / A); }
  double operator*(const node &A) { return x * A.x + y * A.y; }
  double operator%(const node &A) { return x * A.y - y * A.x; }
  double angle() { return atan2(y, x); }
  double norm() { return x * x + y * y; }
  double len() { return sqrt(x * x + y * y); }
  void read() { scanf("%lf%lf", &x, &y); }
  void prt() { printf("%lf %lf\n", x, y); }
} a[N];
void add(double L, double R) {
  if (R > pi)
    add(L, pi), add(-pi, R - 2 * pi);
  else if (L < -pi)
    add(L + 2 * pi, pi), add(-pi, R);
  else
    v[t++] = L - 1e-15, v[t++] = R + 1e-15;
}
bool cmp(const int i, const int j) { return v[i] < v[j]; }
bool check(int i) {
  t = s = 0;
  v[t++] = -pi, v[t++] = pi;
  if (a[i].x < m) {
    ang = acos(a[i].x / m);
    for (int k = 0; k < 2; ++k) add(-pi - ang, -pi + ang);
  }
  if (a[i].x > w - m) {
    ang = acos((w - a[i].x) / m);
    for (int k = 0; k < 2; ++k) add(0 - ang, 0 + ang);
  }
  if (a[i].y < m) {
    ang = acos(a[i].y / m);
    for (int k = 0; k < 2; ++k) add(-pi / 2 - ang, -pi / 2 + ang);
  }
  if (a[i].y > h - m) {
    ang = acos((h - a[i].y) / m);
    for (int k = 0; k < 2; ++k) add(pi / 2 - ang, pi / 2 + ang);
  }
  for (int j = 0; j < n; ++j)
    if (i != j && m * 2 > d[i][j] && d[i][j] > eps)
      ang = acos(d[i][j] / 2 / m), add(e[i][j] - ang, e[i][j] + ang);
  for (int i = 0; i < t; ++i) p[i] = i;
  sort(p, p + t, cmp);
  for (int i = 0; i < t; ++i)
    if ((s += (p[i] & 1 ? -1 : 1)) < 3 && i + 1 < t &&
        v[p[i + 1]] - v[p[i]] > eps)
      return 1;
  return 0;
}
int main() {
  scanf("%d%d%d", &w, &h, &n);
  for (int i = 0; i < n; ++i) a[i].read(), q[i] = i;
  random_shuffle(q, q + n);
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j)
      d[i][j] = (a[j] - a[i]).len(), e[i][j] = (a[j] - a[i]).angle();
  for (int i = 0; i < n; ++i)
    if (check(q[i])) {
      l = m, r = 2e6;
      while (l + eps < r) m = (l + r) / 2, check(q[i]) ? l = m : r = m;
    }
  printf("%.18lf\n", m);
  return 0;
}
