#include <bits/stdc++.h>
using namespace std;
int n;
int x[300001], y[300001];
long double chk(long double X) {
  long double A = 0;
  for (int i = 1; i <= (n); ++i)
    A = max(A, ((x[i] - X) * (x[i] - X) + (long double)y[i] * y[i]) /
                   ((long double)2 * y[i]));
  return A;
}
int main() {
  int Mx = 0;
  scanf("%d", &n);
  for (int i = 1; i <= (n); ++i) scanf("%d%d", x + i, y + i);
  if (y[1] < 0)
    for (int i = 1; i <= (n); ++i) y[i] = -y[i];
  for (int i = 1; i <= (n); ++i)
    if (y[i] < 0) return puts("-1"), 0;
  long double l = -1.1e7, r = 1.1e7, mid1, mid2;
  for (int ti = 1; ti <= (100); ++ti) {
    mid1 = (l + l + r) / 3, mid2 = (l + r + r) / 3;
    long double a1 = chk(mid1), a2 = chk(mid2);
    if (a1 > a2)
      l = mid1;
    else
      r = mid2;
  }
  printf("%.10lf\n", (double)chk(mid1));
  return 0;
}
