#include <bits/stdc++.h>
using namespace std;
const int maxn = 2005;
const double PI = acosl(-1), eps = 1e-10;
struct node {
  double x, y;
  node(void) {}
  node(double a, double b) : x(a), y(b) {}
  long double len() { return sqrt(x * x + y * y); }
  void read() { scanf("%lf%lf", &x, &y); }
};
node operator-(const node &a, const node &b) {
  return node(a.x - b.x, a.y - b.y);
}
double angle[maxn][maxn], dis[maxn][maxn];
node p[maxn * 2];
int n, m;
double normalize(double a) {
  for (; a >= 2 * PI; a -= 2 * PI)
    ;
  for (; a < 0; a += 2 * PI)
    ;
  return a;
}
pair<double, pair<int, int> > info[maxn * 10];
int tot;
void add(double p, int ty, int x) {
  info[++tot] = pair<double, pair<int, int> >(p, pair<int, int>(ty, x));
}
bool test(int oo, double r) {
  if (r < eps) return 1;
  node o = p[oo];
  pair<int, int> cur = pair<int, int>(0, 0);
  tot = 0;
  for (int i = 0; i < n + m; i++) {
    double len = dis[oo][i];
    if (len < eps) {
      cur.first += (i < n);
      continue;
    }
    if (len > 2 * r) continue;
    double ang = angle[oo][i], alpha = acos((len / 2) / r);
    double u = normalize(ang + alpha), v = normalize(ang - alpha);
    if (u > v) swap(u, v);
    if (v - u > PI) swap(u, v);
    if (i < n)
      add(u, 0, 1), add(v, 0, -1);
    else
      add(u, 1, 1), add(v, 1, -1);
    if (u > v) {
      if (i < n)
        add(2 * PI, 0, -1), add(0, 0, 1);
      else
        add(2 * PI, 1, -1), add(0, 1, 1);
    }
  }
  if (!tot) return cur.first > 0;
  add(0, 0, 0), add(2 * PI, 0, 0);
  sort(info + 1, info + tot + 1);
  for (int i = 1; i <= tot;) {
    int j = i;
    for (; j <= tot && fabs(info[j].first - info[i].first) < eps; ++j)
      if (info[j].second.first == 0)
        cur.first += info[j].second.second;
      else
        cur.second += info[j].second.second;
    if (j == tot + 1) break;
    if (cur.first > 0 && cur.second == 0) return 1;
    i = j;
  }
  return 0;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) p[i].read();
  for (int i = n; i < n + m; i++) p[i].read();
  for (int i = 0; i < n + m; i++)
    for (int j = 0; j < n + m; j++)
      dis[i][j] = (p[j] - p[i]).len(),
      angle[i][j] = atan2(p[j].y - p[i].y, p[j].x - p[i].x);
  static int lis[maxn * 2];
  for (int i = 0; i < n + m; i++) lis[i] = i;
  random_shuffle(lis, lis + n);
  random_shuffle(lis + n + 1, lis + n + m);
  double ans = 0.0;
  for (int p = 0; p < n + m; p++) {
    int i = lis[p];
    if (test(i, ans + 1e-8)) {
      double l = ans, r = 1e10;
      for (int j = 0; j < 50 && r - l > 1e-8; j++) {
        double mid = (l + r) / 2;
        if (test(i, mid))
          l = ans = mid;
        else
          r = mid;
      }
    }
  }
  if (ans >= 1e9) ans = -1;
  printf("%.10f\n", ans);
  return 0;
}
