#include <bits/stdc++.h>
using namespace std;
struct point {
  int x, y;
  point() {}
  point(int x, int y) : x(x), y(y) {}
  point rotate() { return point(-y, x); }
};
set<pair<int, int> > s;
point a[1000];
point operator+(const point &a, const point &b) {
  return point(a.x + b.x, a.y + b.y);
}
point operator-(const point &a, const point &b) {
  return point(a.x - b.x, a.y - b.y);
}
point operator/(const point &a, int b) { return point(a.x / b, a.y / b); }
int operator*(const point &a, const point &b) { return a.x * b.y - a.y * b.x; }
void intersect(const point &s1a, const point &s1b, const point &s2a,
               const point &s2b, double &x, double &y) {
  double d1 = (s1b - s1a) * (s2a - s1a);
  double d2 = (s1b - s1a) * (s2b - s1a);
  x = double(s2a.x * d2 - s2b.x * d1) / (d2 - d1);
  y = double(s2a.y * d2 - s2b.y * d1) / (d2 - d1);
}
int sqrdis(point a, point b) {
  return (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y);
}
int checkit(int n, double t, double x, double y) {
  for (int i = (1); i <= (n); i++) {
    double dis =
        sqrt((a[i].x - x) * (a[i].x - x) + (a[i].y - y) * (a[i].y - y));
    if (dis + 1e-8 < t) return 0;
  }
  return 1;
}
void lemon() {
  int n;
  scanf("%d", &n);
  for (int i = (1); i <= (n); i++) {
    scanf("%d%d", &a[i].x, &a[i].y);
    a[i].x *= 2, a[i].y *= 2;
    s.insert(make_pair(a[i].x, a[i].y));
  }
  double final = -1;
  for (int i = (1); i <= (n); i++)
    for (int j = (i + 1); j <= (n); j++)
      for (int k = (j + 1); k <= (n); k++) {
        if (sqrdis(a[i], a[j]) == 0 || sqrdis(a[i], a[k]) == 0 ||
            sqrdis(a[j], a[k]) == 0)
          continue;
        int z[10];
        z[1] = sqrdis(a[i], a[j]);
        z[2] = sqrdis(a[i], a[k]);
        z[3] = sqrdis(a[j], a[k]);
        sort(z + 1, z + 4);
        if (z[1] + z[2] > z[3]) {
          point s1a = (a[i] + a[j]) / 2;
          point s1b = s1a + (a[j] - a[i]).rotate();
          point s2a = (a[i] + a[k]) / 2;
          point s2b = s2a + (a[k] - a[i]).rotate();
          double x, y;
          intersect(s1a, s1b, s2a, s2b, x, y);
          double t =
              sqrt((a[i].x - x) * (a[i].x - x) + (a[i].y - y) * (a[i].y - y));
          if (checkit(n, t, x, y)) final = max(final, t);
        } else if (z[1] + z[2] == z[3]) {
          point p1, p2, p3;
          if (z[3] == sqrdis(a[i], a[j])) p1 = a[i], p2 = a[j], p3 = a[k];
          if (z[3] == sqrdis(a[i], a[k])) p1 = a[i], p2 = a[k], p3 = a[j];
          if (z[3] == sqrdis(a[j], a[k])) p1 = a[j], p2 = a[k], p3 = a[i];
          point p4 = p1 + p2 - p3;
          if (s.count(make_pair(p4.x, p4.y))) {
            point mid = (p1 + p2) / 2;
            double t = sqrt(sqrdis(mid, p1));
            if (checkit(n, t, mid.x, mid.y)) final = max(final, t);
          }
        }
      }
  if (final < 0 || final > 1e100)
    printf("-1\n");
  else
    printf("%.16lf\n", final / 2);
}
int main() {
  ios::sync_with_stdio(true);
  lemon();
  return 0;
}
