#include <bits/stdc++.h>
using namespace std;
const int N = 1E5 + 10;
int n, x[N], y[N];
template <typename T>
double sqr(T n) {
  return 1.0 * n * n;
}
double F(double x0) {
  double R = 0;
  for (int i = 1; i <= n; i++) {
    double r =
        (sqr(x[i]) + sqr(y[i]) + sqr(x0) - 2.0 * x[i] * x0) / (2.0 * y[i]);
    R = max(R, abs(r));
  }
  return R;
}
void TernarySearch() {
  double l = -1E8, r = 1E8;
  for (int timer = 1; timer <= 100; timer++) {
    double m1 = l + (r - l) / 3.0;
    double m2 = r - (r - l) / 3.0;
    if (F(m1) < F(m2))
      r = m2;
    else
      l = m1;
  }
  printf("%.6f", F(l));
}
int main() {
  scanf("%d", &n);
  bool ok1, ok2;
  int cnt0 = 0, x0;
  ok1 = ok2 = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &x[i], &y[i]);
    if (y[i] > 0) ok1 = 1;
    if (y[i] < 0) ok2 = 1;
  }
  if (ok1 && ok2)
    puts("-1");
  else
    TernarySearch();
}
