#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)1e5 + 5;
const int mod = (int)1e9 + 7;
int n, m, k, l, s, t, r, ans, T;
int a[maxn];
int u;
struct st {
  double x, y;
} node[maxn];
double dis(st a, st b) {
  return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
int check(double mid) {
  double lx = -1e15, rx = 1e15;
  for (int i = 1; i <= n; i++) {
    double h = min(fabs(node[i].y - mid), fabs(node[i].y + mid));
    if (h > mid) return false;
    double leg = sqrt(mid - h) * sqrt(mid + h);
    double l = node[i].x - leg, r = node[i].x + leg;
    lx = max(lx, l);
    rx = min(rx, r);
  }
  if (rx - lx >= 0)
    return true;
  else
    return false;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> node[i].x >> node[i].y;
    if (node[i].y * node[i - 1].y < 0) {
      cout << -1 << endl;
      return 0;
    }
  }
  double L = 0, R = 1e15;
  double mid;
  while (u <= 1000) {
    u++;
    mid = (R + L) / 2.0;
    if (check(mid))
      R = mid;
    else
      L = mid;
  }
  if (fabs(mid) < 0.01)
    cout << -1 << endl;
  else
    printf("%.6lf", mid);
  return 0;
}
