#include <bits/stdc++.h>
using namespace std;
using DO = double;
template <typename U, typename V>
inline void smin(U& a, V b) {
  if (a > b) a = b;
}
template <typename U, typename V>
inline void smax(U& a, V b) {
  if (a < b) a = b;
}
const DO inf = 1e20;
struct point {
  DO x, y;
  point(DO x = 0, DO y = 0) : x(x), y(y) {}
  point operator+(point a) { return point(x + a.x, y + a.y); }
  point operator-(point a) { return point(x - a.x, y - a.y); }
  point operator*(DO a) { return point(x * a, y * a); }
  point operator/(DO a) { return point(x / a, y / a); }
  DO operator*(point a) { return x * a.x + y * a.y; }
  DO operator^(point a) { return x * a.y - y * a.x; }
  DO nor() { return sqrt(x * x + y * y); }
  DO sq() { return x * x + y * y; }
  bool operator<(const point& a) const {
    if (x != a.x) return x < a.x;
    return y < a.y;
  }
  void input() { scanf("%lf%lf", &x, &y); }
  void print() { cout << x << ' ' << y << endl; }
};
const int NN = 1111;
point R[NN];
point B[NN];
point p[NN << 1];
point q[NN];
point tmp[NN];
void End() {
  puts("-1");
  exit(0);
}
int n, m, k;
inline DO solve() {
  int i, j, ii, jj;
  for (i = 1; i < m; i++) {
    p[i - 1] = B[0] + (B[i] - B[0]) / (B[i] - B[0]).sq();
  }
  for (i = 0; i < n; i++) {
    q[i] = B[0] + (R[i] - B[0]) / (R[i] - B[0]).sq();
  }
  sort(p, p + m - 1);
  for (i = 0; i < m - 1; i++) tmp[i] = p[i];
  k = 0;
  for (i = 0; i < m - 1; i++) {
    while (k > 1 && (p[k - 1] - p[k - 2] ^ tmp[i] - p[k - 2]) <= 0) k--;
    p[k++] = tmp[i];
  }
  for (i = m - 3, j = k; i >= 0; i--) {
    while (k - j > 0 && (p[k - 1] - p[k - 2] ^ tmp[i] - p[k - 2]) <= 0) k--;
    p[k++] = tmp[i];
  }
  k--;
  DO dir1, dir2, dir3;
  DO h = inf;
  if (k > 1) {
    for (i = 0; i < k; i++) {
      ii = (i + 1) % k;
      jj = (i + 2) % k;
      dir1 = p[ii] - p[i] ^ p[jj] - p[i];
      dir2 = p[ii] - p[i] ^ B[0] - p[i];
      if (dir1 * dir2 < 0) continue;
      for (j = 0; j < n; j++) {
        dir3 = p[ii] - p[i] ^ q[j] - p[i];
        if (dir1 * dir3 <= 0) {
          smin(h, fabs(dir2) / (p[ii] - p[i]).nor());
          if (h == 0) End();
        }
      }
    }
  }
  for (i = 0; i < k; i++) {
    ii = (i + k - 1) % k;
    jj = (i + 1) % k;
    for (j = 0; j < n; j++) {
      dir1 = q[j] - p[i] ^ p[jj] - p[i];
      dir2 = q[j] - p[i] ^ p[ii] - p[i];
      dir3 = q[j] - p[i] ^ B[0] - p[i];
      if (dir1 * dir2 < 0) continue;
      if (dir1 * dir3 <= 0 && dir2 * dir3 <= 0) End();
      smin(h, fabs(dir3) / (q[j] - p[i]).nor());
      if (h == 0) End();
    }
  }
  if (h == inf) return 0;
  return 0.5 / h;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) R[i].input();
  for (int i = 0; i < m; i++) B[i].input();
  if (m <= 2) End();
  DO ans = 0;
  for (int i = 0; i < m; i++) {
    if (i) swap(B[0], B[i]);
    smax(ans, solve());
  }
  printf("%.9lf\n", ans);
  return 0;
}
