#include <bits/stdc++.h>
using namespace std;
struct P {
  long double x, y;
  P() {}
  P(long double _x, long double _y) : x(_x), y(_y) {}
  P operator+(const P& p) const { return P(x + p.x, y + p.y); }
  P operator-(const P& p) const { return P(x - p.x, y - p.y); }
  P operator*(long double d) const { return P(x * d, y * d); }
  P operator/(long double d) const { return P(x / d, y / d); }
  long double det(const P& p) const { return x * p.y - y * p.x; }
  long double dot(const P& p) const { return x * p.x + y * p.y; }
  P rot90() const { return P(-y, x); }
  void read() {
    double _x, _y;
    scanf("%lf%lf", &_x, &_y);
    x = _x;
    y = _y;
  }
  void write() const { printf("%lf %lf", (double)x, (double)y); }
  long double dist(const P& p) const {
    long double dx = x - p.x;
    long double dy = y - p.y;
    return sqrtl(dx * dx + dy * dy);
  }
};
const int MAX_N_CIRCLES = 2000 + 10;
int n;
P ps[MAX_N_CIRCLES];
int cr[MAX_N_CIRCLES];
pair<long double, int> events[MAX_N_CIRCLES * 10];
int nEvents;
void addCover(long double l, long double r, int tp) {
  int val = 1;
  if (tp == 0) val = 2;
  events[nEvents++] = make_pair(l, val);
  events[nEvents++] = make_pair(r, -val);
}
const long double PI = acosl(-1.0);
void normalize(long double& alpha) {
  while (alpha >= 2 * PI) alpha -= 2 * PI;
  while (alpha < 0) alpha += 2 * PI;
}
bool check(int id, long double R) {
  P c1 = ps[id];
  nEvents = 0;
  for (int oid = 0; oid < n; ++oid) {
    if (oid == id) continue;
    P c2 = ps[oid];
    long double d = c1.dist(c2);
    if (d > R + R) continue;
    long double alpha = acosl(d / (2 * R));
    long double am = atan2l(c2.y - c1.y, c2.x - c1.x);
    long double left = am - alpha, right = am + alpha;
    normalize(left);
    normalize(right);
    if (left < right) {
      addCover(left, right, cr[oid]);
    } else {
      addCover(left, 2 * PI, cr[oid]);
      addCover(0, right, cr[oid]);
    }
  }
  int rcnt = 0, bcnt = 0;
  if (cr[id] == 0) addCover(0, 2 * PI, 0);
  sort(events, events + nEvents);
  for (int i = 0; i < nEvents; ++i) {
    if (i > 0) {
      if ((rcnt > 0) && bcnt == 0) return 1;
    }
    if (abs(events[i].second) == 1)
      bcnt += events[i].second;
    else
      rcnt += events[i].second / 2;
  }
  return 0;
}
int main() {
  int nr, nb;
  cin >> nr >> nb;
  n = 0;
  for (int i = 0; i < nr; ++i) {
    cr[n] = 0;
    ps[n++].read();
  }
  for (int i = 0; i < nb; ++i) {
    cr[n] = 1;
    ps[n++].read();
  }
  for (int i = 0; i < n; ++i)
    if (check(i, (long double)1e15)) {
      puts("-1");
      return 0;
    }
  int perm[MAX_N_CIRCLES];
  for (int i = 0; i < n; ++i) perm[i] = i;
  random_shuffle(perm, perm + n);
  long double ans = 0;
  for (int i = 0; i < n; ++i) {
    int id = perm[i];
    if (cr[id] != 0) continue;
    if (!check(id, ans)) continue;
    long double r = ans + 1;
    while (check(id, r)) r = r * 2;
    long double l = ans;
    for (int it = 0; it < 70; ++it) {
      long double m = (l + r) / 2;
      if (check(id, m))
        l = m;
      else
        r = m;
    }
    ans = l;
  }
  for (int i = 0; i < n; ++i) {
    int id = perm[i];
    if (cr[id] != 1) continue;
    if (!check(id, ans)) continue;
    long double r = ans + 1;
    while (check(id, r)) r = r * 2;
    long double l = ans;
    for (int it = 0; it < 70; ++it) {
      long double m = (l + r) / 2;
      if (check(id, m))
        l = m;
      else
        r = m;
    }
    ans = l;
  }
  printf("%0.10lf\n", (double)ans);
}
