#include <bits/stdc++.h>
using namespace std;
const int inf = 1.01e9;
inline long double eps(long double x, long double y) {
  long double EPS = (abs(x) + abs(y) + 1) * 1e-13;
  return EPS;
}
struct pt {
  long double x, y;
  pt() {}
  pt(long double xx, long double yy) : x(xx), y(yy) {}
  void read() {
    double xx, yy;
    scanf("%lf%lf", &xx, &yy);
    x = xx, y = yy;
  }
};
inline pt operator+(pt p1, pt p2) { return pt(p1.x + p2.x, p1.y + p2.y); }
inline pt operator-(pt p1, pt p2) { return pt(p1.x - p2.x, p1.y - p2.y); }
inline pt operator*(pt p, long double c) { return pt(p.x * c, p.y * c); }
inline pt operator*(long double c, pt p) { return pt(p.x * c, p.y * c); }
inline long double len(pt p) { return sqrt(p.x * p.x + p.y * p.y); }
inline long double dist(pt p1, pt p2) {
  long double dx = p1.x - p2.x;
  long double dy = p1.y - p2.y;
  return sqrt(dx * dx + dy * dy);
}
inline long double scal(pt p1, pt p2) { return p1.x * p2.x + p1.y * p2.y; }
inline long double vect(pt p1, pt p2) { return p1.x * p2.y - p1.y * p2.x; }
inline bool operator<(pt p1, pt p2) {
  return p1.x < p2.x - eps(p1.x, p2.x) ||
         (p1.x < p2.x + eps(p1.x, p2.x) && p1.y < p2.y - eps(p1.y, p2.y));
}
const int N = 1010;
pt R[N];
pt b[N];
pt a[N];
pt s[N];
int sc = 0;
pt c[N];
int cc = 0;
int n, m;
long double RAD = 1e4;
pt inv(pt X) {
  long double z = (X.x * X.x + X.y * X.y) / RAD;
  return pt(X.x / z, X.y / z);
}
void convexhull() {
  sort(a, a + m);
  cc = 0;
  sc = 0;
  for (int i = 0; (i) < (m); ++i) {
    while (sc >= 2 &&
           vect(a[i] - s[sc - 1], s[sc - 1] - s[sc - 2]) >
               -eps(len(a[i] - s[sc - 1]), len(s[sc - 1] - s[sc - 2])))
      --sc;
    s[sc++] = a[i];
  }
  for (int i = 0; (i) < (sc - 1); ++i) c[cc++] = s[i];
  sc = 0;
  for (int i = m - 1; i >= 0; --i) {
    while (sc >= 2 &&
           vect(a[i] - s[sc - 1], s[sc - 1] - s[sc - 2]) >
               -eps(len(a[i] - s[sc - 1]), len(s[sc - 1] - s[sc - 2])))
      --sc;
    s[sc++] = a[i];
  }
  for (int i = 0; (i) < (sc - 1); ++i) c[cc++] = s[i];
}
long double dist(pt X, pt A, pt B) {
  pt dir = B - A;
  dir = dir * (1. / len(dir));
  pt Y = A + dir * scal(X - A, dir);
  return dist(X, Y);
}
long double res = 1e100;
void solve() {
  convexhull();
  c[cc] = c[0];
  for (int i = 0; (i) < (cc); ++i)
    if (vect(c[i], c[i + 1]) < eps(len(c[i]), len(c[i + 1]))) {
      res = 1e100;
      return;
    }
  for (int i = 0; (i) < (cc); ++i) {
    res = min(res, dist(pt(0, 0), c[i], c[i + 1]));
  }
}
int findL(pt p) {
  int x = 0;
  for (int k = 10; k >= 0; --k) {
    int y = ((x - (1LL << (k))) % cc + cc) % cc;
    int z = (x + (1LL << (k))) % cc;
    if (vect(c[x] - p, c[y] - p) > 0) x = y;
    if (vect(c[x] - p, c[z] - p) > 0) x = z;
  }
  while (1) {
    int y = (x - 1 + cc) % cc;
    if (vect(c[x] - p, c[y] - p) > -eps(len(c[x] - p), len(c[y] - p)))
      x = y;
    else
      break;
  }
  return x;
}
int findR(pt p) {
  int x = 0;
  for (int k = 10; k >= 0; --k) {
    int y = ((x - (1LL << (k))) % cc + cc) % cc;
    int z = (x + (1LL << (k))) % cc;
    if (vect(c[x] - p, c[y] - p) < 0) x = y;
    if (vect(c[x] - p, c[z] - p) < 0) x = z;
  }
  while (1) {
    int y = (x + 1 + cc) % cc;
    if (vect(c[x] - p, c[y] - p) < eps(len(c[x] - p), len(c[y] - p)))
      x = y;
    else
      break;
  }
  return x;
}
int inside(pt p) {
  if (vect(c[1] - c[0], p - c[0]) < -eps(len(c[1] - c[0]), len(p - c[0])))
    return 0;
  if (vect(p - c[0], c[cc - 1] - c[0]) <
      -eps(len(p - c[0]), len(c[cc - 1] - c[0])))
    return 0;
  int l = 1;
  int r = cc - 2;
  while (l < r) {
    int mid = (l + r + 1) >> 1;
    if (vect(c[mid] - c[0], p - c[0]) > -eps(len(c[mid] - c[0]), len(p - c[0])))
      l = mid;
    else
      r = mid - 1;
  }
  return vect(c[l + 1] - c[l], p - c[l]) >
             -eps(len(c[l + 1] - c[l]), len(p - c[l])) &&
         vect(c[0] - c[l + 1], p - c[l + 1]) >
             -eps(len(c[0] - c[l + 1]), len(p - c[l + 1]));
}
pt z[N];
int cnt[N];
void solve2() {
  for (int i = 0; (i) < (cc + 1); ++i) cnt[i] = 0;
  convexhull();
  c[cc] = c[0];
  if (cc <= 2) {
    res = 0;
    return;
  }
  int val = 0;
  for (int i = 0; (i) < (n); ++i) {
    if (inside(z[i])) continue;
    if (cc <= 2) {
      res = 0;
      return;
    }
    int x = findL(z[i]);
    int y = findR(z[i]);
    cnt[x]++;
    cnt[y]--;
    if (x > y) val++;
  }
  for (int i = 0; (i) < (cc); ++i) {
    val += cnt[i];
    if (val > 0) {
      res = min(res, dist(pt(0, 0), c[i], c[i + 1]));
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; (i) < (n); ++i) R[i].read();
  for (int i = 0; (i) < (m); ++i) b[i].read();
  for (int i = 0; (i) < (n); ++i) {
    for (int j = 0; (j) < (m); ++j) a[j] = inv(b[j] - R[i]);
    solve();
  }
  for (int i = 0; (i) < (m); ++i) {
    for (int j = 0; (j) < (m); ++j) {
      if (i != j) a[j] = inv(b[j] - b[i]);
    }
    for (int j = 0; (j) < (n); ++j) z[j] = inv(R[j] - b[i]);
    a[i] = pt(0, 0);
    solve2();
  }
  if (res < 1e-14)
    printf("-1\n");
  else
    printf("%.10f\n", (double)(0.5 * RAD / res));
  return 0;
}

### Prompt

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

Hongcow really likes the color red. Hongcow doesn't like the color blue.

Hongcow is standing in an infinite field where there are n red points and m blue points.

Hongcow wants to draw a circle in the field such that this circle contains at least one red point, and no blue points. Points that line exactly on the boundary of the circle can be counted as either inside or outside.

Compute the radius of the largest circle that satisfies this condition. If this circle can have arbitrarily large size, print  - 1. Otherwise, your answer will be accepted if it has relative or absolute error at most 10 - 4.

Input

The first line of the input will contain two integers n, m (1 ≤ n, m ≤ 1, 000).

The next n lines will contain two integers xi, yi (1 ≤ xi, yi ≤ 104). This denotes the coordinates of a red point.

The next m lines will contain two integers xi, yi (1 ≤ xi, yi ≤ 104). This denotes the coordinates of a blue point.

No two points will have the same coordinates.

Output

Print  - 1 if the circle can have arbitrary size. Otherwise, print a floating point number representing the largest radius circle that satisfies the conditions. Your answer will be considered correct if its absolute or relative error does not exceed 10 - 4.

Namely, let's assume that your answer is a and the answer of the jury is b. The checker program will consider your answer correct if <image>.

Examples

Input

2 5
2 3
3 4
1 1
1 4
4 2
4 7
2 5


Output

3.5355338827


Input

1 6
3 3
1 5
5 4
2 1
3 4
4 2
1 3


Output

1.5811388195


Input

2 2
2 2
3 3
1 1
4 4


Output

-1

Note

This is a picture of the first sample 

<image>

This is a picture of the second sample 

<image>

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const int inf = 1.01e9;
inline long double eps(long double x, long double y) {
  long double EPS = (abs(x) + abs(y) + 1) * 1e-13;
  return EPS;
}
struct pt {
  long double x, y;
  pt() {}
  pt(long double xx, long double yy) : x(xx), y(yy) {}
  void read() {
    double xx, yy;
    scanf("%lf%lf", &xx, &yy);
    x = xx, y = yy;
  }
};
inline pt operator+(pt p1, pt p2) { return pt(p1.x + p2.x, p1.y + p2.y); }
inline pt operator-(pt p1, pt p2) { return pt(p1.x - p2.x, p1.y - p2.y); }
inline pt operator*(pt p, long double c) { return pt(p.x * c, p.y * c); }
inline pt operator*(long double c, pt p) { return pt(p.x * c, p.y * c); }
inline long double len(pt p) { return sqrt(p.x * p.x + p.y * p.y); }
inline long double dist(pt p1, pt p2) {
  long double dx = p1.x - p2.x;
  long double dy = p1.y - p2.y;
  return sqrt(dx * dx + dy * dy);
}
inline long double scal(pt p1, pt p2) { return p1.x * p2.x + p1.y * p2.y; }
inline long double vect(pt p1, pt p2) { return p1.x * p2.y - p1.y * p2.x; }
inline bool operator<(pt p1, pt p2) {
  return p1.x < p2.x - eps(p1.x, p2.x) ||
         (p1.x < p2.x + eps(p1.x, p2.x) && p1.y < p2.y - eps(p1.y, p2.y));
}
const int N = 1010;
pt R[N];
pt b[N];
pt a[N];
pt s[N];
int sc = 0;
pt c[N];
int cc = 0;
int n, m;
long double RAD = 1e4;
pt inv(pt X) {
  long double z = (X.x * X.x + X.y * X.y) / RAD;
  return pt(X.x / z, X.y / z);
}
void convexhull() {
  sort(a, a + m);
  cc = 0;
  sc = 0;
  for (int i = 0; (i) < (m); ++i) {
    while (sc >= 2 &&
           vect(a[i] - s[sc - 1], s[sc - 1] - s[sc - 2]) >
               -eps(len(a[i] - s[sc - 1]), len(s[sc - 1] - s[sc - 2])))
      --sc;
    s[sc++] = a[i];
  }
  for (int i = 0; (i) < (sc - 1); ++i) c[cc++] = s[i];
  sc = 0;
  for (int i = m - 1; i >= 0; --i) {
    while (sc >= 2 &&
           vect(a[i] - s[sc - 1], s[sc - 1] - s[sc - 2]) >
               -eps(len(a[i] - s[sc - 1]), len(s[sc - 1] - s[sc - 2])))
      --sc;
    s[sc++] = a[i];
  }
  for (int i = 0; (i) < (sc - 1); ++i) c[cc++] = s[i];
}
long double dist(pt X, pt A, pt B) {
  pt dir = B - A;
  dir = dir * (1. / len(dir));
  pt Y = A + dir * scal(X - A, dir);
  return dist(X, Y);
}
long double res = 1e100;
void solve() {
  convexhull();
  c[cc] = c[0];
  for (int i = 0; (i) < (cc); ++i)
    if (vect(c[i], c[i + 1]) < eps(len(c[i]), len(c[i + 1]))) {
      res = 1e100;
      return;
    }
  for (int i = 0; (i) < (cc); ++i) {
    res = min(res, dist(pt(0, 0), c[i], c[i + 1]));
  }
}
int findL(pt p) {
  int x = 0;
  for (int k = 10; k >= 0; --k) {
    int y = ((x - (1LL << (k))) % cc + cc) % cc;
    int z = (x + (1LL << (k))) % cc;
    if (vect(c[x] - p, c[y] - p) > 0) x = y;
    if (vect(c[x] - p, c[z] - p) > 0) x = z;
  }
  while (1) {
    int y = (x - 1 + cc) % cc;
    if (vect(c[x] - p, c[y] - p) > -eps(len(c[x] - p), len(c[y] - p)))
      x = y;
    else
      break;
  }
  return x;
}
int findR(pt p) {
  int x = 0;
  for (int k = 10; k >= 0; --k) {
    int y = ((x - (1LL << (k))) % cc + cc) % cc;
    int z = (x + (1LL << (k))) % cc;
    if (vect(c[x] - p, c[y] - p) < 0) x = y;
    if (vect(c[x] - p, c[z] - p) < 0) x = z;
  }
  while (1) {
    int y = (x + 1 + cc) % cc;
    if (vect(c[x] - p, c[y] - p) < eps(len(c[x] - p), len(c[y] - p)))
      x = y;
    else
      break;
  }
  return x;
}
int inside(pt p) {
  if (vect(c[1] - c[0], p - c[0]) < -eps(len(c[1] - c[0]), len(p - c[0])))
    return 0;
  if (vect(p - c[0], c[cc - 1] - c[0]) <
      -eps(len(p - c[0]), len(c[cc - 1] - c[0])))
    return 0;
  int l = 1;
  int r = cc - 2;
  while (l < r) {
    int mid = (l + r + 1) >> 1;
    if (vect(c[mid] - c[0], p - c[0]) > -eps(len(c[mid] - c[0]), len(p - c[0])))
      l = mid;
    else
      r = mid - 1;
  }
  return vect(c[l + 1] - c[l], p - c[l]) >
             -eps(len(c[l + 1] - c[l]), len(p - c[l])) &&
         vect(c[0] - c[l + 1], p - c[l + 1]) >
             -eps(len(c[0] - c[l + 1]), len(p - c[l + 1]));
}
pt z[N];
int cnt[N];
void solve2() {
  for (int i = 0; (i) < (cc + 1); ++i) cnt[i] = 0;
  convexhull();
  c[cc] = c[0];
  if (cc <= 2) {
    res = 0;
    return;
  }
  int val = 0;
  for (int i = 0; (i) < (n); ++i) {
    if (inside(z[i])) continue;
    if (cc <= 2) {
      res = 0;
      return;
    }
    int x = findL(z[i]);
    int y = findR(z[i]);
    cnt[x]++;
    cnt[y]--;
    if (x > y) val++;
  }
  for (int i = 0; (i) < (cc); ++i) {
    val += cnt[i];
    if (val > 0) {
      res = min(res, dist(pt(0, 0), c[i], c[i + 1]));
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; (i) < (n); ++i) R[i].read();
  for (int i = 0; (i) < (m); ++i) b[i].read();
  for (int i = 0; (i) < (n); ++i) {
    for (int j = 0; (j) < (m); ++j) a[j] = inv(b[j] - R[i]);
    solve();
  }
  for (int i = 0; (i) < (m); ++i) {
    for (int j = 0; (j) < (m); ++j) {
      if (i != j) a[j] = inv(b[j] - b[i]);
    }
    for (int j = 0; (j) < (n); ++j) z[j] = inv(R[j] - b[i]);
    a[i] = pt(0, 0);
    solve2();
  }
  if (res < 1e-14)
    printf("-1\n");
  else
    printf("%.10f\n", (double)(0.5 * RAD / res));
  return 0;
}

```