#include <bits/stdc++.h>
using namespace std;
int n;
long double _L, _R;
struct Point {
  long double x, y;
} p[100010];
bool check(long double _X, long double _Y) {
  long double dis, f = _Y * _Y;
  for (int i = 1; i <= n; i++) {
    dis = (p[i].x - _X) * (p[i].x - _X) + (p[i].y - _Y) * (p[i].y - _Y);
    if (dis > f) {
      return false;
    }
  }
  return true;
}
long double f(long double tx) {
  long double L = 0, R = 1e16, mid;
  for (int _ = 0; _ < 75; _++) {
    mid = (L + R) / 2;
    if (check(tx, mid))
      R = mid;
    else
      L = mid;
  }
  return L;
}
int main() {
  scanf("%d", &n);
  int zero = 0, postive = 0, negetive = 0;
  long double tx;
  for (int i = 1; i <= n; i++) {
    int _, __;
    scanf("%d%d", &_, &__), p[i].x = _, p[i].y = __;
    if (p[i].y == 0) {
      tx = p[i].x;
      zero++;
    }
    if (p[i].y > 0) postive++;
    if (p[i].y < 0) negetive++;
  }
  if (zero > 1 || postive * negetive > 0)
    puts("-1");
  else {
    if (negetive)
      for (int i = 1; i <= n; i++) p[i].y = -p[i].y;
    if (zero == 1) {
      long double L = 0, R = 1e16, mid;
      for (int _ = 0; _ < 300; _++) {
        mid = (L + R) / 2;
        if (check(tx, mid))
          R = mid;
        else
          L = mid;
      }
      cout << L << endl;
    } else {
      long double L = -1e7, R = 1e7, mid, midmid;
      for (int _ = 0; _ < 75; _++) {
        mid = (L + R) / 2;
        midmid = (mid + R) / 2;
        if (f(mid) < f(midmid))
          R = midmid;
        else
          L = mid;
      }
      cout << setprecision(20) << f(L) << endl;
    }
  }
}
