#include <bits/stdc++.h>
using namespace std;
int w, h, n, x[1010], y[1010];
inline long double calc(long double a, long double b, int id) {
  return (a - x[id]) * (a - x[id]) + (b - y[id]) * (b - y[id]);
}
inline long double calc(long double x, long double y) {
  long double mn = 1e18, secmn = 1e18;
  for (int i = 1; i <= n; i++) {
    long double c = calc(x, y, i);
    if (c < mn)
      secmn = mn, mn = c;
    else if (c < secmn)
      secmn = c;
  }
  return secmn;
}
class rect {
 public:
  long double lx, rx, ly, ry, d;
  bool operator<(const rect &t) const { return d > t.d; }
  inline long double calc() { return ::calc((lx + rx) / 2, (ly + ry) / 2); }
};
long double calc(vector<rect> &v, int dep) {
  if (dep == 10) {
    long double ret = 0;
    for (auto &x : v) ret = max(ret, x.d);
    return ret;
  }
  vector<rect> ret;
  for (auto &x : v) {
    long double dx = x.rx - x.lx, dy = x.ry - x.ly;
    for (int i = 0; i < 10; i++) {
      for (int j = 0; j < 10; j++) {
        ret.push_back((rect){x.lx + i * dx / 10, x.lx + (i + 1) * dx / 10,
                             x.ly + j * dy / 10, x.ly + (j + 1) * dy / 10, 0});
        ret.back().d = ret.back().calc();
      }
    }
  }
  sort(ret.begin(), ret.end());
  ret.resize(10);
  return calc(ret, dep + 1);
}
int main() {
  scanf("%d%d%d", &w, &h, &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &x[i], &y[i]);
  }
  vector<rect> c;
  c.push_back((rect){0, (long double)w, 0, (long double)h, 0});
  c.back().d = c.back().calc();
  printf("%.12Lf\n", sqrt(calc(c, 0)));
  return 0;
}
