#include <bits/stdc++.h>
using namespace std;
const int mx = 112345, INF = 0x3f3f3f3f;
pair<int, int> v[mx];
int n;
bool isEnclosed(long double first, long double second) {
  for (int i = 0; i < n; i++) {
    if ((v[i].first - first) * (v[i].first - first) +
            (v[i].second - second) * (v[i].second - second) >
        second * second)
      return 0;
  }
  return 1;
}
long double computeCircle(long double first) {
  long double lo = 0, hi = 1e14;
  for (int i = 0; i < 100; i++) {
    long double m = (lo + hi) / 2;
    if (isEnclosed(first, m))
      hi = m;
    else
      lo = m;
  }
  return lo;
}
int main() {
  cin >> n;
  bool has_pos = 0, has_neg = 0;
  int minx = 1e7, maxx = -1e7;
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &v[i].first, &v[i].second);
    has_pos |= (v[i].second > 0);
    has_neg |= (v[i].second < 0);
    if (v[i].second < 0) v[i].second = -v[i].second;
    maxx = max(maxx, v[i].first);
    minx = min(minx, v[i].first);
  }
  if (has_pos && has_neg) {
    cout << -1 << endl;
    return 0;
  }
  long double A = minx, B = maxx, ans = 1e14;
  for (int i = 0; i < 50; i++) {
    if (abs(A - B) < 1e-8) break;
    long double m1 = (A * 2 + B) / 3.0;
    long double m2 = (A + 2 * B) / 3.0;
    long double Ar = computeCircle(m1);
    long double Br = computeCircle(m2);
    if (Ar > Br)
      A = m1;
    else
      B = m2;
    ans = min(ans, Ar);
    ans = min(ans, Br);
  }
  ans = min(ans, computeCircle(A));
  cout << fixed << setprecision(6) << ans << endl;
}
