#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-13;
long double ms = 1e9, ml = 0;
int n, m, hbt, hrt;
struct P {
  long double x;
  long double y;
};
P pb[22222], pr[22222], ipb[22222], ipr[22222], hb[22222], o;
P operator-(P a, P b) {
  P c;
  c.x = a.x - b.x;
  c.y = a.y - b.y;
  return c;
}
P operator+(P a, P b) {
  P c;
  c.x = a.x + b.x;
  c.y = a.y + b.y;
  return c;
}
double operator*(P a, P b) { return a.x * b.y - a.y * b.x; }
double operator^(P a, P b) { return a.x * b.x + a.y * b.y; }
double dis(P a, P b) {
  P c = a - b;
  return c ^ c;
}
P nor(P a, P b) {
  P c = a - b;
  long double d = c ^ c;
  c.x = c.x * 400 / d;
  c.y = c.y * 400 / d;
  c = b + c;
  return c;
}
bool operator<(P a, P b) {
  long double s = (a - o) * (b - o);
  if (fabs(s) < eps)
    return dis(a, o) < dis(b, o);
  else
    return s > 0;
}
void g(P p[], P h[], int n, int &lala) {
  lala = 0;
  int i, k = 1;
  for (i = 1; i <= n; i++)
    if (p[i].y < p[k].y || (p[i].y == p[k].y && p[i].x < p[k].x)) k = i;
  swap(p[1], p[k]);
  o = p[1];
  sort(p + 1, p + n + 1);
  for (i = 1; i <= n; i++) {
    while (lala > 1) {
      if ((h[lala] - h[lala - 1]) * (p[i] - h[lala]) > 0)
        break;
      else
        lala--;
    }
    lala++;
    h[lala] = p[i];
  }
}
void inverse() {
  int i, j;
  long double s;
  P l, r, p;
  for (i = 1; i <= hbt; i++) {
    l = hb[(i + 1) % hbt + 1] - hb[i % hbt + 1];
    r = hb[i % hbt + 1] - hb[(i - 1) % hbt + 1];
    for (j = 1; j <= n; j++) {
      p = ipr[j] - hb[i % hbt + 1];
      if (p * l > -eps) {
        s = (l * (o - hb[i % hbt + 1]));
        if (ms * ms * (l ^ l) > s * s * ml) {
          ms = s;
          ml = (l ^ l);
        }
        if (r * p > -eps) {
          s = (p * (o - hb[i % hbt + 1]));
          if (ms * ms * (p ^ p) > s * s * ml) {
            ms = s;
            ml = (p ^ p);
          }
        }
      }
    }
  }
}
int main() {
  int i, j;
  double x, y;
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n; i++) {
    scanf("%lf%lf", &x, &y);
    pr[i].x = x;
    pr[i].y = y;
  }
  for (i = 1; i <= m; i++) {
    scanf("%lf%lf", &x, &y);
    pb[i].x = x;
    pb[i].y = y;
  }
  for (i = 1; i <= m; i++) {
    for (j = 1; j <= n; j++) ipr[j] = nor(pr[j], pb[i]);
    for (j = 1; j <= m; j++)
      if (j != i) ipb[j] = nor(pb[j], pb[i]);
    ipb[i] = ipb[m];
    g(ipb, hb, m - 1, hbt);
    o = pb[i];
    inverse();
  }
  double ans = double((sqrt(ml) * 400) / (2 * ms));
  if (ms <= 0 || m < 3)
    puts("-1");
  else
    printf("%.8lf\n", ans);
  return 0;
}
