#include <bits/stdc++.h>
using namespace std;
struct Point {
  long double x, y;
};
long double eps = 1e-9;
long double solve(vector<Point> &a, long double xp) {
  long double ans = 0;
  for (Point i : a) {
    long double x = abs(xp - i.x);
    long double y2 = x * x + i.y * i.y;
    long double r = y2;
    r /= 2;
    long double u = y2 - x * x;
    u = sqrtl(u);
    r /= u;
    ans = max(ans, r);
  }
  return ans;
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout << setprecision(8) << fixed;
  int n;
  cin >> n;
  vector<Point> a(n);
  long long maxx = 0;
  int lflag, rflag;
  lflag = rflag = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i].x >> a[i].y;
    if (a[i].y < 0)
      lflag = 1;
    else
      rflag = 1;
  }
  if (lflag + rflag == 2) {
    cout << "-1\n";
    return 0;
  }
  for (int i = 0; i < n; i++) {
    a[i].y = abs(a[i].y);
  }
  long double l = -1e7;
  long double r = 1e7;
  while (r - l > eps) {
    long double mid = (l + r) / 2;
    long double r2 = solve(a, mid);
    long double r3 = solve(a, mid + eps);
    long double r1 = solve(a, mid - eps);
    if (r2 <= r1 && r2 <= r3) {
      l = r = mid;
      break;
    } else if (r1 <= r2 && r2 <= r3) {
      r = mid;
    } else if (r1 >= r2 && r2 >= r3) {
      l = mid;
    }
  }
  cout << solve(a, (l + r) / 2) << "\n";
  return 0;
}
