#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  vector<pair<long long int, long long int>> points;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    int x, y;
    cin >> x >> y;
    points.push_back({x, y});
  }
  for (int i = 0; i < n - 1; ++i) {
    if (points[i].second * points[i + 1].second < 0) {
      cout << "-1\n";
      return 0;
    }
  }
  for (int i = 0; i < n; ++i) points[i].second = abs(points[i].second);
  double l = -1e9;
  double r = 1e9;
  double eps = 1e-6;
  auto find_radius = [&points](double x) -> double {
    double maxm = 0.0;
    for (auto [x_point, y_point] : points) {
      double curr_radius =
          ((x - x_point) * (x - x_point) + y_point * y_point) / 2 / y_point;
      maxm = max(maxm, curr_radius);
    }
    return maxm;
  };
  while (r - l > eps) {
    double mid1 = l + (r - l) / 3;
    double mid2 = r - (r - l) / 3;
    double r_from_mid1 = find_radius(mid1);
    double r_from_mid2 = find_radius(mid2);
    if (r_from_mid1 > r_from_mid2)
      l = mid1;
    else
      r = mid2;
  }
  cout << setprecision(10) << find_radius(l) << endl;
  return 0;
}
