#include <bits/stdc++.h>
using namespace std;
template <class T>
void chmin(T& x, T y) {
  y < x ? x = y : T();
}
template <class T>
void chmax(T& x, T y) {
  y > x ? x = y : T();
}
const double EPS = 1e-10, PI = acos(-1), PI_2 = PI + PI;
const int N = 5005;
struct K {
  int t;
  double x, y;
};
inline bool cmp(K x, K y) { return x.x < y.x; }
vector<K> a;
vector<double> dis, ang;
double normal(double x) {
  while (x < 0) x += PI_2;
  while (x >= PI_2) x -= PI_2;
  return x;
}
int sn(double x) { return x < -EPS ? -1 : (x > EPS ? 1 : 0); }
bool check(K x, double r) {
  static K f[N];
  int top = 0;
  vector<double> mx({-1, -1});
  for (int i = 0; i < a.size(); ++i) {
    if (sn(dis[i]) == 0) {
      if (a[i].t == 1) chmax(mx[a[i].t], PI_2);
      continue;
    }
    if (sn(dis[i] - r - r) >= 0) continue;
    double d = acos(dis[i] / (r + r));
    double l = normal(ang[i] - d), r = normal(ang[i] + d);
    if (l > r) {
      chmax(mx[a[i].t], r);
      f[++top] = (K){a[i].t, l, PI_2};
    } else
      f[++top] = (K){a[i].t, l, r};
  }
  sort(f + 1, f + top + 1, cmp);
  for (int i = 1; i <= top; ++i) {
    if (f[i].t == 0) {
      if (mx[0] + EPS < mx[1] && mx[0] + EPS < f[i].x) return true;
    } else {
      if (mx[0] + EPS < f[i].x) return true;
    }
    chmax(mx[f[i].t], f[i].y);
  }
  return mx[0] + EPS < mx[1];
}
double solve(K x, double left) {
  dis.resize(a.size());
  ang.resize(a.size());
  for (int i = 0; i < a.size(); ++i) {
    K f = (K){0, a[i].x - x.x, a[i].y - x.y};
    dis[i] = sqrt(f.x * f.x + f.y * f.y);
    ang[i] = atan2(f.y, f.x);
  }
  if (!check(x, left)) return 0;
  double right = 5e8;
  while (fabs(right - left) / max(left, 1.0) > 1e-5) {
    double mid = (left + right) / 2;
    if (check(x, mid))
      left = mid;
    else
      right = mid;
  }
  if (right == (double)5e8) puts("-1"), exit(0);
  return left;
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  a.resize(n + m);
  for (int i = 0; i < n; ++i) scanf("%lf%lf", &a[i].x, &a[i].y), a[i].t = 1;
  for (int i = n; i < n + m; ++i) scanf("%lf%lf", &a[i].x, &a[i].y), a[i].t = 0;
  double ans = 0;
  for (int i = 0; i < a.size(); ++i) chmax(ans, solve(a[i], ans));
  printf("%.10lf\n", ans);
  return 0;
}
