#include <bits/stdc++.h>
using namespace std;
bool debug = 0;
int n, m, k;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
string direc = "RDLU";
long long ln, lk, lm;
void etp(bool f = 0) {
  puts(f ? "yes" : "no");
  exit(0);
}
void addmod(int &x, int y, int mod = 1000000007) {
  x += y;
  if (x >= mod) x -= mod;
  assert(x >= 0 && x < mod);
}
void et() {
  puts("-1");
  exit(0);
}
struct Point {
  long double x, y;
  Point() {}
  Point(long double x, long double y) : x(x), y(y) {}
  long double abs() const { return hypot(x, y); }
  long double arg() const { return atan2(y, x); }
  Point operator*(double o) const { return Point(x * o, y * o); }
  Point operator+(const Point &o) const { return Point(x + o.x, y + o.y); }
  Point operator-(const Point &o) const { return Point(x - o.x, y - o.y); }
  bool operator<(const Point &o) const {
    return x < o.x - 1e-6 || (x < o.x + 1e-6 && y < o.y - 1e-6);
  }
  friend bool operator==(const Point &r1, const Point &r2) {
    return r1.x == r2.x && r1.y == r2.y;
  }
  Point scale(double o) const { return *this * (o / abs()); }
  Point rotY() const { return Point(-y, x); }
  Point rotX() const { return Point(y, -x); }
  long double cross(Point b) const { return x * b.y - b.x * y; }
  long double dot(Point b) const { return x * b.x + y * b.y; }
  long double disToSeg(Point &a, Point &b) {
    return fabs(((*this) - a).cross(b - a) / (b - a).abs());
  }
  void readin() { scanf("%Lf%Lf", &x, &y); }
} p[2135];
void fm(long double &x) {
  if (x <= -acos(-1)) x += acos(-1) * 2;
  if (x > acos(-1)) x -= acos(-1) * 2;
}
bool ck(int tar, long double r) {
  vector<pair<long double, int>> vp;
  for (int(i) = 1; (i) <= (int)(n + m); (i)++)
    if (i != tar) {
      long double dis = (p[i] - p[tar]).abs();
      if (dis > r + r) continue;
      long double arc = (p[i] - p[tar]).arg();
      long double the = acos(dis / 2 / r);
      long double a2 = arc + the, a1 = arc - the;
      fm(a1);
      fm(a2);
      if (a1 <= a2) {
        vp.push_back({a1, i <= n ? 1 : -(1 << 30)});
        vp.push_back({a2, i <= n ? -1 : (1 << 30)});
      } else {
        vp.push_back({-acos(-1), i <= n ? 1 : -(1 << 30)});
        vp.push_back({a2, i <= n ? -1 : (1 << 30)});
        vp.push_back({a1, i <= n ? 1 : -(1 << 30)});
        vp.push_back({acos(-1), i <= n ? -1 : (1 << 30)});
      }
    }
  if (tar <= n) {
    vp.push_back({-acos(-1), 1});
    vp.push_back({acos(-1), -1});
  }
  sort(vp.begin(), vp.end());
  long long cc = 0;
  for (auto p : vp) {
    cc += p.second;
    if (cc > 0) return 1;
  }
  return 0;
}
void fmain() {
  scanf("%d%d", &n, &m);
  for (int(i) = 1; (i) <= (int)(n + m); (i)++) p[i].readin();
  long double ans = 0;
  for (int(i) = 1; (i) <= (int)(n + m); (i)++)
    if (ck(i, ans)) {
      if (ck(i, 1e11)) et();
      long double l = ans, r = 1e11;
      while (r - l > 1e-6) {
        long double mid = (l + r) / 2;
        if (ck(i, mid))
          l = mid;
        else
          r = mid;
      }
      ans = l;
    }
  printf("%.10Lf\n", ans);
}
int main() {
  int t = 1;
  for (int(i) = 1; (i) <= (int)(t); (i)++) {
    fmain();
  }
  return 0;
}
