#include <bits/stdc++.h>
using namespace std;
int a;
long double maxw, maxw1, s, poc, kon, pom, dl, w;
pair<long double, long double> b[100010];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> a;
  for (int i = 0; i < a; i++) {
    cin >> b[i].first >> b[i].second;
    if (i != 0) {
      if (b[i].second > 0 && b[i - 1].second < 0) {
        cout << "-1";
        return 0;
      } else if (b[i].second < 0 && b[i - 1].second > 0) {
        cout << "-1";
        return 0;
      }
    }
  }
  for (int i = 0; i < a; i++) {
    b[i].second = abs(b[i].second);
  }
  poc = -10000000;
  kon = 10000000;
  cout << fixed;
  cout.precision(6);
  sort(b, b + a);
  int licz2 = 0;
  while (poc + 0.0000001 < kon && licz2 < 80) {
    licz2++;
    s = (poc + kon) / 2;
    maxw = 0;
    maxw1 = 0;
    for (int i = 0; i < a; i++) {
      pom = atan2l(b[i].first - s, b[i].second);
      dl = (b[i].first - s) * (b[i].first - s) + b[i].second * b[i].second;
      dl = sqrt(dl);
      dl /= 2;
      w = dl / cos(pom);
      if (w > maxw) {
        maxw = w;
      }
    }
    s += 0.0000001;
    for (int i = 0; i < a; i++) {
      pom = atan2l(b[i].first - s, b[i].second);
      dl = (b[i].first - s) * (b[i].first - s) + b[i].second * b[i].second;
      dl = sqrt(dl);
      dl /= 2;
      w = dl / cos(pom);
      if (w > maxw1) {
        maxw1 = w;
      }
    }
    if (maxw1 > maxw) {
      kon = s - 0.0000001;
    } else {
      poc = s;
    }
  }
  cout << maxw;
  return 0;
}
