#include <bits/stdc++.h>
const int MAXN = 2010;
const long double eps = 1e-6;
bool le(long double a, long double b) { return a + eps < b; }
bool ge(long double a, long double b) { return a - eps > b; }
bool leq(long double a, long double b) { return a - eps <= b; }
bool geq(long double a, long double b) { return a + eps >= b; }
bool eq(long double a, long double b) { return a <= b + eps && b <= a + eps; }
struct vec {
  long double x, y;
  vec() { x = y = 0; }
  vec(long double a, long double b) { x = a, y = b; }
  long double operator^(vec b) const { return x * b.y - y * b.x; }
  long double operator*(vec b) const { return x * b.x + y * b.y; }
  long double norm2() const { return x * x + y * y; }
  long double norm() const { return sqrt(x * x + y * y); }
  vec operator-(vec b) const { return vec(x - b.x, y - b.y); }
  vec operator+(vec b) const { return vec(x + b.x, y + b.y); }
  vec operator*(long double k) const { return vec(x * k, y * k); }
  bool operator<(const vec& b) const { return x == b.x ? y < b.y : x < b.x; }
  friend std::istream& operator>>(std::istream& in, vec& x) {
    in >> x.x >> x.y;
    return in;
  }
  friend std::ostream& operator<<(std::ostream& out, vec& x) {
    out << x.x << ' ' << x.y;
    return out;
  }
};
inline long double cross(vec a, vec b, vec c) { return (b - a) ^ (c - a); }
int n, m;
vec A[MAXN];
std::vector<std::pair<long double, int> > V;
long double nil = -123456789;
const long double PI = acosl(-1);
long double red(long double x) { return fmodl(x + PI * 2 * 5, PI * 2); }
std::pair<long double, long double> calc(vec x, vec y, long double r) {
  if (ge((x = y - x).norm2(), r * r * 4))
    return std::pair<long double, long double>(nil, nil);
  long double dis = x.norm();
  long double delta = acosl(dis / 2 / r);
  long double deg = atan2l(x.y, x.x);
  return std::pair<long double, long double>(red(deg - delta),
                                             red(deg + delta));
}
bool solve(int idx, long double R) {
  V.clear();
  if (idx <= n) V.emplace_back((long double)0, 1);
  for (int i = 1; i <= n + m; ++i)
    if (i != idx) {
      std::pair<long double, long double> r = calc(A[idx], A[i], R);
      if (r.first == nil) continue;
      const int v = i <= n ? 1 : -1e6;
      if (r.first > r.second) V.emplace_back((long double)0, v);
      V.emplace_back(r.first, v);
      V.emplace_back(r.second, -v);
    }
  std::sort(V.begin(), V.end());
  int now = 0;
  for (auto t : V)
    if ((now += t.second) > 0) return true;
  return false;
}
const long double ma = 1e9;
int main() {
  std::ios_base::sync_with_stdio(false), std::cin.tie(0);
  std::cin >> n >> m;
  for (int i = 1; i <= n + m; ++i) std::cin >> A[i];
  long double l = 0.5;
  for (int i = 1; i <= n + m; ++i)
    if (solve(i, l)) {
      long double r = ma, mid;
      while (le(l, r)) solve(i, mid = (l + r) / 2) ? l = mid : r = mid;
    }
  if (l > ma - 1.2243)
    std::cout << -1 << std::endl;
  else
    std::cout << std::fixed << std::setprecision(10) << l << std::endl;
  return 0;
}
