#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int n;
struct Point {
  long double x, y;
  Point(long double x = 0, long double y = 0) : x(x), y(y) {}
} a[N];
long double get(long double u) {
  long double res = 0;
  for (int i = 1; i <= n; i++) {
    long double delta = (u - a[i].x) * (u - a[i].x);
    long double foo = delta + a[i].y * a[i].y;
    foo /= a[i].y;
    foo /= 2.;
    res = max(res, foo);
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  int flag = 0;
  for (int i = 1; i <= n; i++) {
    int x, y;
    cin >> x >> y;
    a[i] = Point(x, y);
    if (y < 0) {
      flag |= 1;
    } else {
      flag |= 2;
    }
  }
  if (flag == 3) {
    cout << -1 << endl;
    return 0;
  }
  if (flag == 1) {
    for (int i = 1; i <= n; i++) {
      a[i].y = -a[i].y;
    }
  }
  long double low = -2e7, high = 2e7;
  for (int it = 1; it <= 200; it++) {
    long double mid1 = (low * 2 + high) / 3.;
    long double mid2 = (low + high * 2) / 3.;
    long double res1 = get(mid1);
    long double res2 = get(mid2);
    if (res1 < res2) {
      high = mid2;
    } else {
      low = mid1;
    }
  }
  cout << fixed << setprecision(14) << get((low + high) / 2) << endl;
  return 0;
}
