#include <bits/stdc++.h>
using namespace std;
struct s1 {
  double x, y;
} p[100002];
int n;
bool vu, vd;
double ccl(double xi) {
  double ans = 0;
  for (int i = 1; i <= n; ++i)
    ans = max(ans,
              abs((p[i].x - xi) * (p[i].x - xi) / (p[i].y * 2) + p[i].y / 2));
  return ans;
}
double dv3(double l, double r) {
  while (r - l > 1e-7) {
    double mid0 = l + (r - l) / 3, mid1 = l + (r - l) * 2 / 3;
    double ans0 = ccl(mid0), ans1 = ccl(mid1);
    if (ans0 < ans1)
      r = mid1;
    else
      l = mid0;
  }
  return l;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%lf%lf", &p[i].x, &p[i].y);
    if (p[i].y > 0) vu = true;
    if (p[i].y < 0) vd = true;
  }
  if (vu && vd)
    printf("-1");
  else
    printf("%.7lf", ccl(dv3(-10000000, 10000000)));
  return 0;
}
