#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
struct Node {
  long long x, y;
} p[N];
int n;
double ans, a, b, c, xx, x1, yy1, x2, x3, y2, y3, x, y;
int tf;
map<pair<long long, long long>, int> f;
inline double dis(Node a, Node b) {
  return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
inline long long dis1(Node a, Node b) {
  return (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y);
}
inline double check(double x, double y) {
  double ans = 2e9 + 7;
  for (int i = 1; i <= n; i++)
    ans = std::min(
        ans, sqrt((x - p[i].x) * (x - p[i].x) + (y - p[i].y) * (y - p[i].y)));
  return ans;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lld%lld", &p[i].x, &p[i].y);
    f[make_pair(p[i].x, p[i].y)] = 1;
  }
  ans = -1;
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      for (int k = j + 1; k <= n; k++) {
        a = dis(p[i], p[j]), b = dis(p[i], p[k]), c = dis(p[j], p[k]), tf = 1;
        if (abs(a - b) < 1e-10 && abs(c * c - a * a - b * b) < 1e-10 &&
            f[make_pair(p[j].x + p[k].x - p[i].x, p[j].y + p[k].y - p[i].y)])
          x = (p[j].x + p[k].x) / 2.0, y = (p[j].y + p[k].y) / 2.0;
        else if (abs(a - c) < 1e-10 && abs(b * b - a * a - c * c) < 1e-10 &&
                 f[make_pair(p[i].x + p[k].x - p[j].x,
                             p[i].y + p[k].y - p[j].y)])
          x = (p[i].x + p[k].x) / 2.0, y = (p[i].y + p[k].y) / 2.0;
        else if (abs(b - c) < 1e-10 && abs(a * a - b * b - c * c) < 1e-10 &&
                 f[make_pair(p[j].x + p[i].x - p[k].x,
                             p[j].y + p[i].y - p[k].y)])
          x = (p[j].x + p[i].x) / 2.0, y = (p[j].y + p[i].y) / 2.0;
        else
          tf = 0;
        if (tf) {
          xx = check(x, y);
          if (abs(xx - sqrt((x - p[i].x) * (x - p[i].x) +
                            (y - p[i].y) * (y - p[i].y))) < 1e-10 ||
              xx - sqrt((x - p[i].x) * (x - p[i].x) +
                        (y - p[i].y) * (y - p[i].y)) >
                  1e-10)
            ans = std::max(ans, sqrt((x - p[i].x) * (x - p[i].x) +
                                     (y - p[i].y) * (y - p[i].y)));
        }
        if (abs(a + b - c) < 1e-10 || c - a - b > 1e-10 ||
            abs(a + c - b) < 1e-10 || b - a - c > 1e-10 ||
            abs(b + c - a) < 1e-10 || a - b - c > 1e-10)
          continue;
        if (dis1(p[i], p[j]) + dis1(p[i], p[k]) <= dis1(p[j], p[k]) ||
            dis1(p[j], p[i]) + dis1(p[j], p[k]) <= dis1(p[i], p[k]) ||
            dis1(p[k], p[i]) + dis1(p[k], p[j]) <= dis1(p[i], p[j]))
          continue;
        x1 = p[i].x, x2 = p[j].x, x3 = p[k].x, yy1 = p[i].y, y2 = p[j].y,
        y3 = p[k].y;
        x = ((x1 * x1 - x2 * x2 + yy1 * yy1 - y2 * y2) * (yy1 - y3) -
             (x1 * x1 - x3 * x3 + yy1 * yy1 - y3 * y3) * (yy1 - y2)) /
            (2 * (yy1 - y3) * (x1 - x2) - 2 * (yy1 - y2) * (x1 - x3));
        y = ((x1 * x1 - x2 * x2 + yy1 * yy1 - y2 * y2) * (x1 - x3) -
             (x1 * x1 - x3 * x3 + yy1 * yy1 - y3 * y3) * (x1 - x2)) /
            (2 * (yy1 - y2) * (x1 - x3) - 2 * (yy1 - y3) * (x1 - x2));
        xx = check(x, y);
        if (abs(xx - sqrt((x - p[i].x) * (x - p[i].x) +
                          (y - p[i].y) * (y - p[i].y))) < 1e-10 ||
            xx - sqrt((x - p[i].x) * (x - p[i].x) +
                      (y - p[i].y) * (y - p[i].y)) >
                1e-10)
          ans = std::max(ans, sqrt((x - p[i].x) * (x - p[i].x) +
                                   (y - p[i].y) * (y - p[i].y)));
      }
    }
  }
  if (ans < 0)
    printf("-1\n");
  else
    printf("%.6lf\n", ans);
  return 0;
}
