#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-11;
const double INVR2 = 10000.0;
int sgn(double x) {
  if (fabs(x) < eps) return 0;
  return x < 0 ? -1 : 1;
}
struct Point {
  double x, y;
  Point(double xp = 0, double yp = 0) : x(xp), y(yp) {}
  Point operator+(const Point& rhs) const {
    return Point(x + rhs.x, y + rhs.y);
  }
  Point operator-(const Point& rhs) const {
    return Point(x - rhs.x, y - rhs.y);
  }
  Point operator*(const double& k) const { return Point(x * k, y * k); }
  Point operator/(const double& k) const { return Point(x / k, y / k); }
  bool operator<(const Point& rhs) const {
    return x < rhs.x || (x == rhs.x && y < rhs.y);
  }
  bool operator==(const Point& rhs) const {
    return sgn(x - rhs.x) == 0 && sgn(y - rhs.y) == 0;
  }
  Point turn(double rad) {
    return Point(x * cos(rad) - y * sin(rad), x * sin(rad) + y * cos(rad));
  }
  Point turn90() { return Point(-y, x); }
  void scan() { scanf("%lf%lf", &x, &y); }
};
Point nPoint() {
  Point res;
  res.scan();
  return res;
}
double dot(Point x, Point y) { return x.x * y.x + x.y * y.y; }
double length(Point x) { return sqrt(dot(x, x)); }
double dist2(Point A, Point B) { return dot(A - B, A - B); }
double cross(Point A, Point B) { return A.x * B.y - A.y * B.x; }
double angle(Point A, Point B) {
  return acos(dot(A, B) / length(A) / length(B));
}
double PLDist(Point P, Point A, Point B) {
  return fabs(cross(B - P, A - P) / length(A - B));
}
int Clockwise(Point O, Point A, Point B) { return sgn(cross(A - O, B - O)); }
bool OnSeg(Point P, Point A, Point B) {
  Point v = B - P, w = A - P;
  if (sgn(cross(v, w)) != 0) return false;
  return sgn(dot(v, w)) == -1;
}
vector<Point> convexHull(vector<Point> pts, int strict = 1) {
  sort(pts.begin(), pts.end());
  int pn = (int)pts.size(), m = -1;
  vector<Point> res(pn << 1);
  for (int i = 0; i < pn; ++i) {
    while (m > 0 &&
           sgn(cross(res[m] - res[m - 1], pts[i] - res[m - 1])) < strict)
      m--;
    res[++m] = pts[i];
  }
  int k = m;
  for (int i = pn - 2; i >= 0; --i) {
    while (m > k &&
           sgn(cross(res[m] - res[m - 1], pts[i] - res[m - 1])) < strict)
      m--;
    res[++m] = pts[i];
  }
  res.resize(m + (pn == 1));
  return res;
}
int InPolygon(Point pt, vector<Point> po) {
  int sz = (int)po.size(), wn = 0;
  po.push_back(po[0]);
  for (int i = 0; i < sz; ++i) {
    Point u = po[i], v = po[i + 1];
    if (OnSeg(pt, u, v) || pt == u) return 1;
    if (sgn(u.y - v.y) == 1) swap(u, v);
    if (pt.y <= u.y || pt.y > v.y) continue;
    if (sgn(cross(pt - u, v - u)) == -1) wn ^= 1;
  }
  return wn << 1;
}
int n, m;
double ans;
vector<Point> red, blue, wch;
double solve(Point o) {
  vector<Point> nred, nblue, nch;
  for (auto r : red) nred.push_back((r - o) * INVR2 / dist2(r, o));
  for (auto b : blue) {
    if (b == o)
      nblue.emplace_back(0, 0);
    else
      nblue.push_back((b - o) * INVR2 / dist2(b, o));
  }
  double ret = 0;
  nch = convexHull(nblue);
  int sz = (int)nch.size();
  for (int i = 0; i < sz; ++i) {
    int hasRed = false, cho = Clockwise(Point(0, 0), nch[i], nch[(i + 1) % sz]);
    for (auto r : nred)
      if (Clockwise(r, nch[i], nch[(i + 1) % sz]) != 1) hasRed = true;
    if (hasRed)
      ret = max(ret, INVR2 / PLDist(Point(0, 0), nch[i], nch[(i + 1) % sz]));
  }
  for (int i = 0; i < sz; ++i)
    for (auto r : nred) {
      if (Clockwise(nch[(i + sz - 1) % sz], nch[i], r) *
              Clockwise(nch[(i + 1) % sz], nch[i], r) >=
          0) {
        ret = max(ret, INVR2 / PLDist(Point(0, 0), nch[i], r));
      }
    }
  return ret;
}
int main() {
  scanf("%d%d", &n, &m);
  if (m == 1) {
    puts("-1");
    return 0;
  }
  for (int i = 1; i <= n; ++i) red.push_back(nPoint());
  for (int i = 1; i <= m; ++i) blue.push_back(nPoint());
  wch.insert(wch.end(), red.begin(), red.end());
  wch.insert(wch.end(), blue.begin(), blue.end());
  wch = convexHull(wch);
  for (auto p : red)
    if (InPolygon(p, wch) == 1) {
      puts("-1");
      return 0;
    }
  for (auto p : blue) ans = max(ans, solve(p));
  printf("%.11f\n", ans / 2.0);
  return 0;
}
