#include <bits/stdc++.h>
using namespace std;
vector<pair<double, double> > V;
int N;
long double x, y, l = -1.0e7, r = 1.0e7, m1, m2, R1, R2;
long double Dist(long double x) {
  long double res = 0;
  for (auto c : V)
    res = max(res, (((long double)(c.first - x) * (c.first - x) +
                     (long double)(c.second * c.second)) /
                    ((long double)2 * c.second)));
  return res;
}
int main() {
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> x >> y;
    V.emplace_back(x, y);
  }
  bool Co = V[0].second > 0;
  for (auto c : V)
    if (Co != (c.second > 0)) return cout << -1 << endl, 0;
  if (!Co)
    for (int i = 0; i < N; i++) V[i].second = -V[i].second;
  for (int i = 0; i < 300; i++) {
    m1 = (long double)(l + l + r) / 3;
    m2 = (long double)(l + r + r) / 3;
    R1 = Dist(m1), R2 = Dist(m2);
    if (R1 > R2)
      l = m1;
    else
      r = m2;
  }
  cout << fixed << setprecision(10) << R1 << endl;
  return 0;
}
