#include <bits/stdc++.h>
using namespace std;
double radius(vector<int> x, vector<int> y, double X) {
  double r = 0;
  for (int i = 0; i < x.size(); ++i) {
    double a = x[i] - X;
    double b = y[i];
    double rtemp = (a * a + b * b) / (2 * b);
    r = max(r, rtemp);
  }
  return r;
}
int main() {
  clock_t clk_begin = clock();
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  vector<int> x(n), y(n);
  int neg = 0, pos = 0;
  int minx = INT_MAX, maxx = INT_MIN;
  for (int i = 0; i < n; ++i) {
    cin >> x[i] >> y[i];
    if (y[i] < 0)
      neg = 1;
    else
      pos = 1;
    minx = min(x[i], minx);
    maxx = max(x[i], maxx);
  }
  if (neg && pos) {
    cout << -1 << '\n';
    ;
    cerr << "Time taken: " << (double)(clock() - clk_begin) / CLOCKS_PER_SEC
         << '\n';
    return 0;
    ;
  }
  if (neg) {
    for (int i = 0; i < n; ++i) y[i] *= -1;
  }
  double lo = minx, hi = maxx;
  while (abs(hi - lo) > 1e-6) {
    double mid1 = lo + (hi - lo) / 3.0;
    double mid2 = hi - (hi - lo) / 3.0;
    double r1 = radius(x, y, mid1);
    double r2 = radius(x, y, mid2);
    if (r1 > r2)
      lo = mid1;
    else
      hi = mid2;
  }
  double r = (lo + hi) / 2;
  r = radius(x, y, r);
  cout << setprecision(6) << fixed << r << '\n';
  ;
  cerr << "Time taken: " << (double)(clock() - clk_begin) / CLOCKS_PER_SEC
       << '\n';
  return 0;
  ;
}
