#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1e-12, INF = 1e15, PI = acos(-1);
int K, T, ID[1005];
long double N, M, X[1005], Y[1005], Dis[1005][1005], Arg[1005][1005];
struct Nod {
  long double x, y;
} Q[1005 << 4];
inline bool Big(long double a, long double b) { return a > b + EPS; }
inline bool Sma(long double a, long double b) { return a < b - EPS; }
inline bool Equ(long double a, long double b) { return abs(a - b) < EPS; }
inline bool Le(long double a, long double b) { return !Big(a, b); }
inline bool Re(long double a, long double b) { return !Sma(a, b); }
void Upd(long double l, long double r, long double v) {
  for (; l < 0; l += 2 * PI)
    ;
  for (; r < 0; r += 2 * PI)
    ;
  for (; l >= 2 * PI; l -= 2 * PI)
    ;
  for (; r >= 2 * PI; r -= 2 * PI)
    ;
  if (l <= r)
    Q[++T] = (Nod){l, v}, Q[++T] = (Nod){r, -v};
  else
    Q[++T] = (Nod){0, v}, Q[++T] = (Nod){r, -v}, Q[++T] = (Nod){l, v},
    Q[++T] = (Nod){2 * PI, -v};
}
inline bool Cmp(const Nod& a, const Nod& b) { return Sma(a.x, b.x); }
bool Right(int u, long double D) {
  T = 0;
  for (int i = 1; i <= K; i++)
    if (!Equ(X[i], X[u]) || !Equ(Y[i], Y[u])) {
      long double a = D, b = D, c = Dis[u][i];
      if (a + b <= c) continue;
      long double v = acos(.5 * c / a);
      Upd(Arg[u][i] - v, Arg[u][i] + v, 1);
    }
  if (Sma(N - X[u], D)) Upd(-acos((N - X[u]) / D), acos((N - X[u]) / D), INF);
  if (Sma(X[u], D)) Upd(PI - acos(X[u] / D), PI + acos(X[u] / D), INF);
  if (Sma(M - Y[u], D))
    Upd(PI / 2 - acos((M - Y[u]) / D), PI / 2 + acos((M - Y[u]) / D), INF);
  if (Sma(Y[u], D))
    Upd(-PI / 2 - acos(Y[u] / D), -PI / 2 + acos(Y[u] / D), INF);
  Q[++T] = (Nod){0, 0};
  Q[++T] = (Nod){2 * PI, 0};
  sort(Q + 1, Q + T + 1, Cmp);
  long double Now = 0;
  for (int i = 1, j; i <= T; i = j) {
    for (j = i; j <= T && Equ(Q[i].x, Q[j].x); j++) Now += Q[j].y;
    if (j <= T && Le(Now, 1)) return 1;
  }
  return 0;
}
int main() {
  srand(time(0));
  cin >> N >> M >> K;
  for (int i = 1; i <= K; i++) ID[i] = i;
  random_shuffle(ID + 1, ID + K + 1);
  for (int i = 1; i <= K; i++) cin >> X[ID[i]] >> Y[ID[i]];
  for (int i = 1; i <= K; i++)
    for (int j = 1; j <= K; j++)
      Dis[i][j] =
          sqrt((X[i] - X[j]) * (X[i] - X[j]) + (Y[i] - Y[j]) * (Y[i] - Y[j]));
  for (int i = 1; i <= K; i++)
    for (int j = 1; j <= K; j++) Arg[i][j] = atan2(Y[j] - Y[i], X[j] - X[i]);
  long double L = 0, R = sqrt(N * N + M * M);
  for (int i = 1; i <= K; i++)
    if (Right(i, L + (1e-9))) {
      long double l = L, r = R;
      for (; l + (1e-9) < r;) {
        long double Mid = (l + r) * .5;
        Right(i, Mid) ? l = Mid : r = Mid;
      }
      L = l;
    }
  printf("%.12lf\n", (double)L);
}

### Prompt

Create a solution in Cpp for 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 long double EPS = 1e-12, INF = 1e15, PI = acos(-1);
int K, T, ID[1005];
long double N, M, X[1005], Y[1005], Dis[1005][1005], Arg[1005][1005];
struct Nod {
  long double x, y;
} Q[1005 << 4];
inline bool Big(long double a, long double b) { return a > b + EPS; }
inline bool Sma(long double a, long double b) { return a < b - EPS; }
inline bool Equ(long double a, long double b) { return abs(a - b) < EPS; }
inline bool Le(long double a, long double b) { return !Big(a, b); }
inline bool Re(long double a, long double b) { return !Sma(a, b); }
void Upd(long double l, long double r, long double v) {
  for (; l < 0; l += 2 * PI)
    ;
  for (; r < 0; r += 2 * PI)
    ;
  for (; l >= 2 * PI; l -= 2 * PI)
    ;
  for (; r >= 2 * PI; r -= 2 * PI)
    ;
  if (l <= r)
    Q[++T] = (Nod){l, v}, Q[++T] = (Nod){r, -v};
  else
    Q[++T] = (Nod){0, v}, Q[++T] = (Nod){r, -v}, Q[++T] = (Nod){l, v},
    Q[++T] = (Nod){2 * PI, -v};
}
inline bool Cmp(const Nod& a, const Nod& b) { return Sma(a.x, b.x); }
bool Right(int u, long double D) {
  T = 0;
  for (int i = 1; i <= K; i++)
    if (!Equ(X[i], X[u]) || !Equ(Y[i], Y[u])) {
      long double a = D, b = D, c = Dis[u][i];
      if (a + b <= c) continue;
      long double v = acos(.5 * c / a);
      Upd(Arg[u][i] - v, Arg[u][i] + v, 1);
    }
  if (Sma(N - X[u], D)) Upd(-acos((N - X[u]) / D), acos((N - X[u]) / D), INF);
  if (Sma(X[u], D)) Upd(PI - acos(X[u] / D), PI + acos(X[u] / D), INF);
  if (Sma(M - Y[u], D))
    Upd(PI / 2 - acos((M - Y[u]) / D), PI / 2 + acos((M - Y[u]) / D), INF);
  if (Sma(Y[u], D))
    Upd(-PI / 2 - acos(Y[u] / D), -PI / 2 + acos(Y[u] / D), INF);
  Q[++T] = (Nod){0, 0};
  Q[++T] = (Nod){2 * PI, 0};
  sort(Q + 1, Q + T + 1, Cmp);
  long double Now = 0;
  for (int i = 1, j; i <= T; i = j) {
    for (j = i; j <= T && Equ(Q[i].x, Q[j].x); j++) Now += Q[j].y;
    if (j <= T && Le(Now, 1)) return 1;
  }
  return 0;
}
int main() {
  srand(time(0));
  cin >> N >> M >> K;
  for (int i = 1; i <= K; i++) ID[i] = i;
  random_shuffle(ID + 1, ID + K + 1);
  for (int i = 1; i <= K; i++) cin >> X[ID[i]] >> Y[ID[i]];
  for (int i = 1; i <= K; i++)
    for (int j = 1; j <= K; j++)
      Dis[i][j] =
          sqrt((X[i] - X[j]) * (X[i] - X[j]) + (Y[i] - Y[j]) * (Y[i] - Y[j]));
  for (int i = 1; i <= K; i++)
    for (int j = 1; j <= K; j++) Arg[i][j] = atan2(Y[j] - Y[i], X[j] - X[i]);
  long double L = 0, R = sqrt(N * N + M * M);
  for (int i = 1; i <= K; i++)
    if (Right(i, L + (1e-9))) {
      long double l = L, r = R;
      for (; l + (1e-9) < r;) {
        long double Mid = (l + r) * .5;
        Right(i, Mid) ? l = Mid : r = Mid;
      }
      L = l;
    }
  printf("%.12lf\n", (double)L);
}

```