#include <bits/stdc++.h>
using namespace std;
struct Point {
  long double x, y;
  Point operator~() const { return {y, -x}; }
  bool operator<(const Point &P) const {
    return y > P.y || (y == P.y && x < P.x);
  }
  long double operator*(const Point &P) const { return x * P.x + y * P.y; }
  bool operator==(const Point &P) const { return (x == P.x) && (y == P.y); }
  bool operator!=(const Point &P) const { return (x != P.x) || (y != P.y); }
  long double operator^(const Point &P) const { return x * P.y - y * P.x; }
  Point operator+(const Point &P) const { return {x + P.x, y + P.y}; }
  Point operator-(const Point &P) const { return {x - P.x, y - P.y}; }
  Point operator-() const { return {-x, -y}; }
  Point operator/(const long double d) const { return {x / d, y / d}; }
  Point operator*(const long double d) const { return {x * d, y * d}; }
};
long double CK(const Point &A, const Point &B, const Point &C) {
  return ((C - B) ^ (B - A));
}
int N, s;
vector<Point> P, H;
long double M = 50000000000001, E = 0.0000001, two = 2, nn = -1, zero = 0;
bool check(const long double &R) {
  if (H[0].y > two * R) return false;
  long double x1 = H[0].x - sqrtl(H[0].y * (two * R - H[0].y));
  long double x2 = H[0].x + sqrtl(H[0].y * (two * R - H[0].y));
  for (int i = 1; i < H.size() && x1 <= x2; i++) {
    x1 = max(x1, H[i].x - sqrtl(H[i].y * (two * R - H[i].y)));
    x2 = min(x2, H[i].x + sqrtl(H[i].y * (two * R - H[i].y)));
  }
  return x1 <= x2;
}
long double get() {
  long double Ra = 0, Rb = M;
  int C = 0;
  while (Rb - Ra > E && C++ < 10000) {
    if (check((Ra + Rb) / two))
      Rb = (Ra + Rb) / two;
    else
      Ra = (Ra + Rb) / two;
  }
  return (Ra + Rb) / two;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> N;
  P.resize(N);
  int positive = 0, negative = 0;
  for (int i = 0; i < N; i++) {
    cin >> P[i].x >> P[i].y;
    if (P[i].y > 0)
      positive++;
    else
      negative++;
  }
  if (positive != 0 && negative != 0) {
    cout << -1 << endl;
    return 0;
  }
  if (negative > 0)
    for (int i = 0; i < N; i++) P[i].y *= nn;
  sort(P.begin(), P.end());
  for (int i = 0; i < N; i++) {
    while (H.size() > 1 && CK(H[H.size() - 2], H[H.size() - 1], P[i]) <= zero)
      H.pop_back();
    H.push_back(P[i]);
  }
  s = H.size();
  for (int i = N - 1; i >= 0; i--) {
    while (H.size() > s && CK(H[H.size() - 2], H[H.size() - 1], P[i]) <= zero)
      H.pop_back();
    H.push_back(P[i]);
  }
  H.pop_back();
  printf("%.20Lf\n", get());
  return 0;
}
