#include <bits/stdc++.h>
using namespace std;
const int N = 4005;
const double eps = 1e-9, pi = acos(-1);
struct point {
  int x, y;
} g[N];
int n, m;
double ans = 0;
inline double dist(point a, point b) {
  return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
struct node {
  double rd;
  int dlt;
  inline bool operator<(const node& rhs) const {
    return (fabs(rd - rhs.rd) > eps ? rd < rhs.rd : dlt < rhs.dlt);
  }
} sta[N * 2];
bool check(int id, double r) {
  point t = g[id];
  int top = 0;
  if (id <= n)
    sta[++top] = (node){0, 1}, sta[++top] = (node){2 * pi, -1};
  else
    for (int i = 1; i <= n; ++i) {
      const double d = dist(t, g[i]);
      if (2 * r + eps < d) continue;
      double deg = acos(d / 2 / r);
      double rgd = asin((g[i].y - t.y) / d);
      if (g[i].x < t.x) rgd = pi - rgd;
      double L = rgd - deg, R = rgd + deg;
      if (L < 0 && R <= 0) L += 2 * pi, R += 2 * pi;
      if (L < 0)
        sta[++top] = (node){L + 2 * pi, 1}, sta[++top] = (node){2 * pi, -1},
        L = 0;
      sta[++top] = (node){L, 1}, sta[++top] = (node){R, -1};
    }
  for (int i = n + 1; i <= n + m; ++i)
    if (id != i) {
      const double d = dist(t, g[i]);
      if (2 * r - eps < d) continue;
      double deg = acos(d / 2 / r);
      double rgd = asin((g[i].y - t.y) / d);
      if (g[i].x < t.x) rgd = pi - rgd;
      double L = rgd - deg, R = rgd + deg;
      if (L < 0 && R <= 0) L += 2 * pi, R += 2 * pi;
      if (L < 0)
        sta[++top] = (node){L + 2 * pi, -10000},
        sta[++top] = (node){2 * pi, 10000}, L = 0;
      sta[++top] = (node){L, -10000}, sta[++top] = (node){R, 10000};
    }
  sort(sta + 1, sta + top + 1);
  sta[top + 1].rd = 123456;
  int now = id <= n;
  for (int i = 1; i <= top; ++i) {
    if (i > 1 && now > 0 && sta[i + 1].rd - sta[i].rd > eps) return 1;
    now += sta[i].dlt;
  }
  return 0;
}
void work() {
  for (int i = 1; i <= n + m; ++i)
    if (check(i, ans)) {
      int T = 0;
      double l = ans, r = 1e9;
      while (r - l >= eps) {
        double mid = (l + r) / 2;
        if (check(i, mid))
          l = ans = mid;
        else
          r = mid;
        if (++T == 128) break;
      }
    }
}
int main() {
  srand(time(0));
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n + m; ++i) scanf("%d%d", &g[i].x, &g[i].y);
  random_shuffle(g + 1, g + n + 1), random_shuffle(g + n + 1, g + n + m + 1);
  work();
  if (ans <= 0.9e9)
    printf("%.11f\n", ans);
  else
    puts("-1");
  return 0;
}
