#include <bits/stdc++.h>
using namespace std;
struct Point {
  double x, y;
  Point() {}
  Point(double x, double y) : x(x), y(y) {}
  Point operator+(const Point& other) const {
    return {x + other.x, y + other.y};
  }
  Point operator-(const Point& other) const {
    return {x - other.x, y - other.y};
  }
  Point operator*(double c) const { return {x * c, y * c}; }
  double len() const { return sqrt(x * x + y * y); }
  bool operator<(const Point& other) const {
    if (x != other.x) {
      return x < other.x;
    }
    return y < other.y;
  }
  double sqrlen() const { return x * x + y * y; }
};
int n, m;
vector<Point> red, blue;
double det(const Point& a, const Point& b, const Point& c) {
  return (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x);
}
double dist(const Point& a, const Point& b) { return (b - a).len(); }
ostream& operator<<(ostream& cout, const Point& a) {
  cout << a.x << " " << a.y;
  return cout;
}
vector<Point> convex_hull(vector<Point>& v) {
  sort(v.begin(), v.end());
  vector<Point> ch;
  int st[2010];
  int k = 0;
  for (int i = 0; i < v.size(); ++i) {
    while (k > 1 && det(v[st[k - 1]], v[st[k]], v[i]) <= 0) --k;
    st[++k] = i;
  }
  for (int i = 1; i <= k; ++i) {
    ch.push_back(v[st[i]]);
  }
  k = 0;
  for (int i = v.size() - 1; i >= 0; --i) {
    while (k > 1 && det(v[st[k - 1]], v[st[k]], v[i]) <= 0) --k;
    st[++k] = i;
  }
  for (int i = 2; i < k; ++i) {
    ch.push_back(v[st[i]]);
  }
  return ch;
}
Point inverse(const Point& a, const Point& b) {
  Point c = b + (a - b) * (1 / (a - b).sqrlen());
  return c;
}
double check(int bi) {
  auto inv_blue = blue;
  inv_blue.erase(inv_blue.begin() + bi);
  for (auto& p : inv_blue) {
    p = inverse(p, blue[bi]);
  }
  auto inv_red = red;
  for (auto& p : inv_red) {
    p = inverse(p, blue[bi]);
  }
  inv_blue = convex_hull(inv_blue);
  if (inv_blue.size() == 0) {
    return -1;
  }
  double closest = 1e20;
  if (inv_blue.size() > 1) {
    for (int i = 0; i < inv_blue.size(); ++i) {
      int ii = (i + 1) % inv_blue.size();
      int iii = (i + 2) % inv_blue.size();
      double poly_det = det(inv_blue[i], inv_blue[ii], inv_blue[iii]);
      double my_det = det(inv_blue[i], inv_blue[ii], blue[bi]);
      if (poly_det * my_det < 0) continue;
      for (int j = 0; j < inv_red.size(); ++j) {
        if (poly_det * det(inv_blue[i], inv_blue[ii], inv_red[j]) <= 0) {
          double d = fabs(my_det) / dist(inv_blue[i], inv_blue[ii]);
          closest = min(closest, d);
          break;
        }
      }
    }
  }
  for (int i = 0; i < inv_blue.size(); ++i) {
    int li = (i - 1 + inv_blue.size()) % inv_blue.size();
    int ii = (i + 1) % inv_blue.size();
    for (int j = 0; j < inv_red.size(); ++j) {
      double poly_det = det(inv_blue[i], inv_red[j], inv_blue[ii]);
      double l_poly_det = det(inv_blue[i], inv_red[j], inv_blue[li]);
      double my_det = det(inv_blue[i], inv_red[j], blue[bi]);
      if (l_poly_det * poly_det >= 0) {
        if (my_det * poly_det <= 0 && my_det * l_poly_det <= 0) {
          closest = 0;
        } else {
          double d = fabs(my_det) / dist(inv_blue[i], inv_red[j]);
          closest = min(closest, d);
        }
      }
    }
  }
  if (closest == 1e20) {
    return 0;
  } else if (closest == 0) {
    return -1;
  } else {
    return 1 / (closest * 2);
  }
}
void read(int n, vector<Point>& v) {
  for (int i = 1; i <= n; ++i) {
    int x, y;
    cin >> x >> y;
    v.push_back(Point(x, y));
  }
}
void solve() {
  cin >> n >> m;
  read(n, red);
  read(m, blue);
  double ans = 0;
  for (int i = 0; i < m; ++i) {
    double cans = check(i);
    if (cans == -1) {
      cout << -1 << "\n";
      return;
    } else {
      ans = max(ans, cans);
    }
  }
  cout << fixed << setprecision(9) << ans << "\n";
}
void reset() {
  red.clear();
  blue.clear();
}
int main() {
  int k = 1;
  for (; k <= 1; ++k) {
    reset();
    solve();
  }
}
