#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-11;
const double PI = acos(-1);
template <class T>
bool eq_(T a, T b) {
  return abs(a - b) < eps;
}
template <class T>
bool lt_(T a, T b) {
  if (eq_(a, b)) return false;
  return a < b;
}
template <class T>
bool le_(T a, T b) {
  if (eq_(a, b)) return true;
  return a < b;
}
double normalize(double x) {
  while (x < -PI) x += PI * 2;
  while (x > PI) x -= PI * 2;
  if (x <= -PI) x += PI * 2;
  return x;
}
struct Circle : vector<double> {
  complex<double> c;
  double r;
  Circle() {}
  Circle(complex<double> c_, double r_) {
    c = c_;
    r = r_;
  }
  complex<double> getPoint(double ang) {
    return c + r * complex<double>(cos(ang), sin(ang));
  }
};
double doP(complex<double> a, complex<double> b) {
  return (conj(a) * b).real();
}
complex<double> proj(complex<double> p, complex<double> b) {
  return b * doP(p, b) / norm(b);
}
complex<double> perp(pair<complex<double>, complex<double> > l,
                     complex<double> a) {
  complex<double> p = l.first, q = l.second;
  return p + proj(a - p, q - p);
}
void iCL(Circle &c, pair<complex<double>, complex<double> > l) {
  complex<double> h = perp(l, c.c);
  double d = abs(h - c.c);
  if (eq_(c.r, d)) {
    double ang = arg(h - c.c);
    c.push_back(ang);
  } else if (eq_(d, (double)0)) {
    complex<double> p = l.first;
    if (eq_(p, c.c)) p = l.second;
    double ang = arg(p - c.c);
    c.push_back(normalize(ang));
    c.push_back(normalize(ang + PI));
  } else if (lt_(d, c.r)) {
    double ang = arg(h - c.c);
    double ang2 = acos(d / (c.r));
    c.push_back(normalize(ang + ang2));
    c.push_back(normalize(ang - ang2));
  }
}
complex<double> ps[1010];
int N;
double W, H;
pair<complex<double>, complex<double> > es[4];
bool isin_(complex<double> p) {
  double x = p.real(), y = p.imag();
  return le_((double)0, x) && le_(x, W) && le_((double)0, y) && le_(y, H);
}
bool check(double R, int id) {
  if (eq_(R, (double)0)) return true;
  Circle c = Circle(ps[id], R);
  for (int i = 0; i < 4; i++) {
    iCL(c, es[i]);
  }
  vector<pair<double, int> > vec;
  for (int i = 0; i < N; i++) {
    if (i == id) continue;
    if (eq_(ps[i], ps[id])) continue;
    double d = abs(ps[i] - ps[id]);
    if (le_(R * 2, d)) continue;
    double ang1 = arg(ps[i] - ps[id]);
    double ang2 = acos(d / (R * 2));
    double lb = normalize(ang1 - ang2);
    double ub = normalize(ang1 + ang2);
    if (lb > ub) {
      vec.push_back(pair<double, int>(-PI, 1));
      vec.push_back(pair<double, int>(ub, -1));
      vec.push_back(pair<double, int>(lb, 1));
      vec.push_back(pair<double, int>(PI, -1));
    } else {
      vec.push_back(pair<double, int>(lb, 1));
      vec.push_back(pair<double, int>(ub, -1));
    }
  }
  for (int i = 0; i < c.size(); i++) {
    vec.push_back(pair<double, int>(c[i], 0));
  }
  vec.push_back(pair<double, int>(-PI, 0));
  vec.push_back(pair<double, int>(PI, 0));
  sort(vec.begin(), vec.end());
  int cnt = 0;
  for (int i = 0; i < (int)vec.size() - 1; i++) {
    cnt += vec[i].second;
    if (cnt <= 1) {
      if (lt_(vec[i].first, vec[i + 1].first)) {
        double ang = (vec[i].first + vec[i + 1].first) / 2;
        complex<double> p = c.getPoint(ang);
        if (isin_(p)) return true;
      }
    }
  }
  return false;
}
bool check(double R) {
  for (int i = 0; i < N; i++) {
    bool flg = check(R, i);
    if (flg) return true;
  }
  return false;
}
void input() {
  int w, h;
  scanf("%d%d%d", &w, &h, &N);
  W = w;
  H = h;
  complex<double> ps2[] = {complex<double>(0, 0), complex<double>(W, 0),
                           complex<double>(W, H), complex<double>(0, H)};
  for (int i = 0; i < 4; i++)
    es[i] = pair<complex<double>, complex<double> >(ps2[i], ps2[(i + 1) % 4]);
  for (int i = 0; i < N; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    ps[i] = complex<double>(x, y);
  }
}
double solve() {
  double lb = 0, ub = 1e7;
  srand(time(NULL));
  for (int i = 1; i < N; i++) {
    int j = rand() % (i + 1);
    swap(ps[i], ps[j]);
  }
  for (int i = 0; i < N; i++) {
    bool flg = check(lb * (1.0 + eps), i);
    if (!flg) continue;
    ub = 1e7;
    if (!flg) continue;
    while (ub / lb > (1 + eps)) {
      double mid = (ub + lb) / 2;
      bool flg = check(mid, i);
      if (flg)
        lb = mid;
      else
        ub = mid;
    }
  }
  return lb;
}
int main() {
  input();
  double ans = solve();
  printf("%.12f\n", (double)ans);
  return 0;
}

### Prompt

Your task is to create a cpp solution to the following problem:

Gena doesn't like geometry, so he asks you to solve this problem for him.

A rectangle with sides parallel to coordinate axes contains n dots. Let's consider some point of the plane. Let's count the distances from this point to the given n points. Let's sort these numbers in the non-decreasing order. We'll call the beauty of the point the second element of this array. If there are two mimimum elements in this array, the beaty will be equal to this minimum.

Find the maximum beauty of a point inside the given rectangle.

Input

The first line contains three integers w, h, n (1 ≤ w, h ≤ 106, 2 ≤ n ≤ 1000) — the lengths of the rectangle sides and the number of points. Next n lines contain two integers xi, yi (0 ≤ xi ≤ w, 0 ≤ yi ≤ h) each — the coordinates of a point. It is possible that it will be coincident points.

Output

Print a single number — the maximum beauty of a point with the absolute or relative error of at most 10 - 9.

Examples

Input

5 5 4
0 0
5 0
0 5
5 5


Output

4.99999999941792340


Input

5 5 3
4 0
2 5
4 1


Output

5.65685424744772010

Note

The point which beauty we need to find must have coordinates (x, y), where 0 ≤ x ≤ w, 0 ≤ y ≤ h. Some of the n points can coincide.

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-11;
const double PI = acos(-1);
template <class T>
bool eq_(T a, T b) {
  return abs(a - b) < eps;
}
template <class T>
bool lt_(T a, T b) {
  if (eq_(a, b)) return false;
  return a < b;
}
template <class T>
bool le_(T a, T b) {
  if (eq_(a, b)) return true;
  return a < b;
}
double normalize(double x) {
  while (x < -PI) x += PI * 2;
  while (x > PI) x -= PI * 2;
  if (x <= -PI) x += PI * 2;
  return x;
}
struct Circle : vector<double> {
  complex<double> c;
  double r;
  Circle() {}
  Circle(complex<double> c_, double r_) {
    c = c_;
    r = r_;
  }
  complex<double> getPoint(double ang) {
    return c + r * complex<double>(cos(ang), sin(ang));
  }
};
double doP(complex<double> a, complex<double> b) {
  return (conj(a) * b).real();
}
complex<double> proj(complex<double> p, complex<double> b) {
  return b * doP(p, b) / norm(b);
}
complex<double> perp(pair<complex<double>, complex<double> > l,
                     complex<double> a) {
  complex<double> p = l.first, q = l.second;
  return p + proj(a - p, q - p);
}
void iCL(Circle &c, pair<complex<double>, complex<double> > l) {
  complex<double> h = perp(l, c.c);
  double d = abs(h - c.c);
  if (eq_(c.r, d)) {
    double ang = arg(h - c.c);
    c.push_back(ang);
  } else if (eq_(d, (double)0)) {
    complex<double> p = l.first;
    if (eq_(p, c.c)) p = l.second;
    double ang = arg(p - c.c);
    c.push_back(normalize(ang));
    c.push_back(normalize(ang + PI));
  } else if (lt_(d, c.r)) {
    double ang = arg(h - c.c);
    double ang2 = acos(d / (c.r));
    c.push_back(normalize(ang + ang2));
    c.push_back(normalize(ang - ang2));
  }
}
complex<double> ps[1010];
int N;
double W, H;
pair<complex<double>, complex<double> > es[4];
bool isin_(complex<double> p) {
  double x = p.real(), y = p.imag();
  return le_((double)0, x) && le_(x, W) && le_((double)0, y) && le_(y, H);
}
bool check(double R, int id) {
  if (eq_(R, (double)0)) return true;
  Circle c = Circle(ps[id], R);
  for (int i = 0; i < 4; i++) {
    iCL(c, es[i]);
  }
  vector<pair<double, int> > vec;
  for (int i = 0; i < N; i++) {
    if (i == id) continue;
    if (eq_(ps[i], ps[id])) continue;
    double d = abs(ps[i] - ps[id]);
    if (le_(R * 2, d)) continue;
    double ang1 = arg(ps[i] - ps[id]);
    double ang2 = acos(d / (R * 2));
    double lb = normalize(ang1 - ang2);
    double ub = normalize(ang1 + ang2);
    if (lb > ub) {
      vec.push_back(pair<double, int>(-PI, 1));
      vec.push_back(pair<double, int>(ub, -1));
      vec.push_back(pair<double, int>(lb, 1));
      vec.push_back(pair<double, int>(PI, -1));
    } else {
      vec.push_back(pair<double, int>(lb, 1));
      vec.push_back(pair<double, int>(ub, -1));
    }
  }
  for (int i = 0; i < c.size(); i++) {
    vec.push_back(pair<double, int>(c[i], 0));
  }
  vec.push_back(pair<double, int>(-PI, 0));
  vec.push_back(pair<double, int>(PI, 0));
  sort(vec.begin(), vec.end());
  int cnt = 0;
  for (int i = 0; i < (int)vec.size() - 1; i++) {
    cnt += vec[i].second;
    if (cnt <= 1) {
      if (lt_(vec[i].first, vec[i + 1].first)) {
        double ang = (vec[i].first + vec[i + 1].first) / 2;
        complex<double> p = c.getPoint(ang);
        if (isin_(p)) return true;
      }
    }
  }
  return false;
}
bool check(double R) {
  for (int i = 0; i < N; i++) {
    bool flg = check(R, i);
    if (flg) return true;
  }
  return false;
}
void input() {
  int w, h;
  scanf("%d%d%d", &w, &h, &N);
  W = w;
  H = h;
  complex<double> ps2[] = {complex<double>(0, 0), complex<double>(W, 0),
                           complex<double>(W, H), complex<double>(0, H)};
  for (int i = 0; i < 4; i++)
    es[i] = pair<complex<double>, complex<double> >(ps2[i], ps2[(i + 1) % 4]);
  for (int i = 0; i < N; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    ps[i] = complex<double>(x, y);
  }
}
double solve() {
  double lb = 0, ub = 1e7;
  srand(time(NULL));
  for (int i = 1; i < N; i++) {
    int j = rand() % (i + 1);
    swap(ps[i], ps[j]);
  }
  for (int i = 0; i < N; i++) {
    bool flg = check(lb * (1.0 + eps), i);
    if (!flg) continue;
    ub = 1e7;
    if (!flg) continue;
    while (ub / lb > (1 + eps)) {
      double mid = (ub + lb) / 2;
      bool flg = check(mid, i);
      if (flg)
        lb = mid;
      else
        ub = mid;
    }
  }
  return lb;
}
int main() {
  input();
  double ans = solve();
  printf("%.12f\n", (double)ans);
  return 0;
}

```