#include <bits/stdc++.h>
using namespace std;
double x[100005], y[100005];
int n;
long double radius(long double cx) {
  long double m = 0;
  for (int i = 0; i < n; i += 1) {
    long double t = fabsl(((1.0 * x[i] - cx) * (1.0 * x[i] - cx)) / 2 / y[i] +
                          1.0 * y[i] / 2);
    m = max(m, t);
  }
  return m;
}
int main() {
  ios::sync_with_stdio(false);
  bool pos = false, neg = false;
  cin >> n;
  double l = 1e9, r = -1e9, cnt = 100, mid1, mid2, r1, r2;
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
    r = max(r, x[i]);
    l = min(l, x[i]);
    if (y[i] > 0)
      pos = true;
    else if (y[i] < 0)
      neg = true;
  }
  if (pos && neg) {
    cout << "-1" << '\n';
    return 0;
  }
  while (cnt--) {
    mid1 = l + (r - l) / 3;
    mid2 = l + (2 * (r - l)) / 3;
    r1 = radius(mid1);
    r2 = radius(mid2);
    if (r1 > r2) {
      l = mid1;
    } else {
      r = mid2;
    }
  }
  cout << setprecision(10) << fixed << radius((mid1 + mid2) / 2) << '\n';
  return 0;
}
