#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  double x[n], y[n];
  for (int i = 0; i < n; i++) scanf("%lf %lf", &x[i], &y[i]);
  for (int i = 0; i < n; i++)
    if (((y[0] > 0) && (y[i] < 0)) || ((y[0] < 0) && (y[i] > 0))) {
      cout << -1 << endl;
      return 0;
    }
  for (int i = 0; i < n; i++)
    if (y[i] < 0) y[i] = -y[i];
  double xmin = 1e10, xmax = -1e10;
  for (int i = 0; i < n; i++) {
    xmin = min(xmin, x[i]);
    xmax = max(xmax, x[i]);
  }
  double ans = 1e20;
  for (int neg = 0; neg < 80; neg++) {
    double xmid1 = (xmin + xmin + xmax) / 3;
    double xmid2 = (xmin + xmax + xmax) / 3;
    double rmid1 = 0, rmid2 = 0;
    for (int i = 0; i < n; i++) {
      rmid1 =
          max(rmid1, ((xmid1 - x[i]) * (xmid1 - x[i]) / 2 / y[i]) + (y[i] / 2));
      rmid2 =
          max(rmid2, ((xmid2 - x[i]) * (xmid2 - x[i]) / 2 / y[i]) + (y[i] / 2));
    }
    if (rmid1 < rmid2)
      xmax = xmid2;
    else
      xmin = xmid1;
    ans = min(ans, min(rmid1, rmid2));
  }
  cout << setprecision(16) << fixed << ans << endl;
  return 0;
}
