Problem: There is a forest that we model as a plane and live n rare animals. Animal number i has its lair in the point (x_{i}, y_{i}). In order to protect them, a decision to build a nature reserve has been made.

The reserve must have a form of a circle containing all lairs. There is also a straight river flowing through the forest. All animals drink from this river, therefore it must have at least one common point with the reserve. On the other hand, ships constantly sail along the river, so the reserve must not have more than one common point with the river.

For convenience, scientists have made a transformation of coordinates so that the river is defined by y = 0. Check whether it is possible to build a reserve, and if possible, find the minimum possible radius of such a reserve.

Input

The first line contains one integer n (1 ≤ n ≤ 10^5) — the number of animals. 

Each of the next n lines contains two integers x_{i}, y_{i} (-10^7 ≤ x_{i}, y_{i} ≤ 10^7) — the coordinates of the i-th animal's lair. It is guaranteed that y_{i} ≠ 0. No two lairs coincide.

Output

If the reserve cannot be built, print -1. Otherwise print the minimum radius. Your answer will be accepted if absolute or relative error does not exceed 10^{-6}.

Formally, let your answer be a, and the jury's answer be b. Your answer is considered correct if \frac{|a - b|}{max{(1, |b|)}} ≤ 10^{-6}.

Examples

Input

1
0 1


Output

0.5

Input

3
0 1
0 2
0 -3


Output

-1


Input

2
0 1
1 1


Output

0.625

Note

In the first sample it is optimal to build the reserve with the radius equal to 0.5 and the center in (0,\ 0.5).

In the second sample it is impossible to build a reserve.

In the third sample it is optimal to build the reserve with the radius equal to 5/8 and the center in (1/2,\ 5/8).

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
istream& operator>>(istream& in, pair<T, U>& data) {
  in >> data.first >> data.second;
  return in;
}
template <typename T>
istream& operator>>(istream& in, vector<T>& vect) {
  for (unsigned i = 0; i < vect.size(); i++) {
    in >> vect[i];
  }
  return in;
}
namespace std {
template <>
struct hash<std::pair<int, int>> {
  inline size_t operator()(const std::pair<int, int>& v) const {
    std::hash<int> int_hasher;
    return int_hasher(v.first) ^ int_hasher(v.second);
  }
};
}  // namespace std
int num_1(int n) {
  int num = 0;
  while (n != 0) {
    n -= (n & -n);
    num++;
  }
  return num;
}
template <typename Out>
void Split(const std::string& s, char delim, Out result) {
  std::stringstream ss(s);
  std::string item;
  while (std::getline(ss, item, delim)) {
    *(result++) = item;
  }
}
std::vector<std::string> str_split(const std::string& s, char delim) {
  std::vector<std::string> elems;
  Split(s, delim, std::back_inserter(elems));
  return elems;
}
vector<int> graph_reachable(const vector<vector<int>>& edges, int node) {
  vector<int> res;
  int n = edges.size();
  vector<bool> visited(n, false);
  stack<int> dfs;
  visited[node] = true;
  dfs.push(node);
  res.push_back(node);
  while (!dfs.empty()) {
    int node = dfs.top();
    dfs.pop();
    for (int other : edges[node]) {
      if (!visited[other]) {
        visited[other] = true;
        res.push_back(other);
        dfs.push(other);
      }
    }
  }
  return res;
}
vector<vector<int>> graph_projection(const vector<vector<int>>& edges,
                                     vector<int> projection) {
  vector<vector<int>> new_edges(projection.size());
  unordered_map<int, int> inverse_projection;
  for (unsigned i = 0; i < projection.size(); i++)
    inverse_projection.insert({projection[i], i});
  for (unsigned i = 0; i < projection.size(); i++) {
    int curr_projected_node = projection[i];
    for (int other : edges[curr_projected_node]) {
      if ((inverse_projection.find(other) != inverse_projection.end())) {
        new_edges[i].push_back(inverse_projection[other]);
      }
    }
  }
  return new_edges;
}
vector<int> topsort(const vector<vector<int>>& edges) {
  vector<int> res;
  int n = edges.size();
  vector<int> degree(n, 0);
  for (auto node_edges : edges) {
    for (auto other : node_edges) {
      degree[other]++;
    }
  }
  for (int i = 0; i < n; i++) {
    if (degree[i] == 0) {
      res.push_back(i);
    }
  }
  int curr = 0;
  while (res.size() != n) {
    int node = res[curr++];
    for (auto other : edges[node]) {
      degree[other]--;
      if (degree[other] == 0) {
        res.push_back(other);
      }
    }
  }
  return res;
}
int graph_nearest(const vector<vector<int>>& edges, int source, int dest) {
  queue<pair<int, int>> bfs;
  vector<bool> visited(edges.size(), false);
  bfs.push({source, 0});
  visited[source] = true;
  while (!bfs.empty()) {
    pair<int, int> node = bfs.front();
    bfs.pop();
    if (node.first == dest) {
      return node.second;
    }
    for (int other : edges[node.first]) {
      if (!visited[other]) {
        bfs.push({other, node.second + 1});
        visited[other] = true;
      }
    }
  }
  return -1;
}
vector<int> get_in_degrees(const vector<vector<int>>& edges) {
  vector<int> degrees(edges.size(), 0);
  for (auto node_edges : edges) {
    for (int other : node_edges) {
      degrees[other]++;
    }
  }
  return degrees;
}
vector<int> tree_preorder(const vector<vector<int>>& edges) {
  vector<int> degrees = get_in_degrees(edges);
  vector<int> res;
  int root = -1;
  for (int i = 0; i < degrees.size(); i++) {
    if (degrees[i] == 0) root = i;
  }
  if (root == -1) {
    return {};
  }
  stack<int> dfs;
  dfs.push(root);
  while (!dfs.empty()) {
    int node = dfs.top();
    dfs.pop();
    res.push_back(node);
    for (int other : edges[node]) {
      dfs.push(other);
    }
  }
  return res;
}
vector<int> tree_postorder(const vector<vector<int>>& edges) {
  vector<int> degrees = get_in_degrees(edges);
  vector<int> res;
  int root = -1;
  for (int i = 0; i < degrees.size(); i++) {
    if (degrees[i] == 0) root = i;
  }
  if (root == -1) {
    return {};
  }
  vector<int> processed(edges.size(), false);
  stack<int> dfs;
  dfs.push(root);
  while (!dfs.empty()) {
    int node = dfs.top();
    if (processed[node]) {
      res.push_back(node);
      dfs.pop();
    } else {
      processed[node] = true;
      for (int other : edges[node]) {
        dfs.push(other);
      }
    }
  }
  return res;
}
vector<int> tree_levelorder(const vector<vector<int>>& edges) {
  vector<int> degrees = get_in_degrees(edges);
  vector<int> res;
  int root = -1;
  for (int i = 0; i < degrees.size(); i++) {
    if (degrees[i] == 0) root = i;
  }
  if (root == -1) {
    return {};
  }
  queue<int> bfs;
  bfs.push(root);
  while (!bfs.empty()) {
    int node = bfs.front();
    bfs.pop();
    res.push_back(node);
    for (int other : edges[node]) {
      bfs.push(other);
    }
  }
  return res;
}
vector<int> graph_preorder(const vector<vector<int>>& edges, int root) {
  vector<int> res;
  vector<bool> visited(edges.size(), false);
  stack<int> dfs;
  visited[root] = true;
  dfs.push(root);
  while (!dfs.empty()) {
    int node = dfs.top();
    dfs.pop();
    res.push_back(node);
    for (int other : edges[node]) {
      if (!visited[other]) {
        visited[other] = true;
        dfs.push(other);
      }
    }
  }
  return res;
}
vector<int> graph_postorder(const vector<vector<int>>& edges, int root) {
  vector<int> res;
  vector<bool> visited(edges.size(), false);
  vector<bool> processed(edges.size(), false);
  stack<int> dfs;
  visited[root] = true;
  dfs.push(root);
  while (!dfs.empty()) {
    int node = dfs.top();
    if (processed[node]) {
      res.push_back(node);
      dfs.pop();
    } else {
      processed[node] = true;
      for (int other : edges[node]) {
        if (!visited[other]) {
          visited[other] = true;
          dfs.push(other);
        }
      }
    }
  }
  return res;
}
vector<int> graph_whole_postorder(const vector<vector<int>>& edges) {
  vector<int> res;
  vector<bool> visited(edges.size(), false);
  vector<bool> processed(edges.size(), false);
  for (int curr = 0; curr < edges.size(); curr++) {
    if (visited[curr]) continue;
    stack<int> dfs;
    visited[curr] = true;
    dfs.push(curr);
    while (!dfs.empty()) {
      int node = dfs.top();
      if (processed[node]) {
        res.push_back(node);
        dfs.pop();
      } else {
        processed[node] = true;
        for (int other : edges[node]) {
          if (!visited[other]) {
            visited[other] = true;
            dfs.push(other);
          }
        }
      }
    }
  }
  return res;
}
vector<vector<int>> graph_transpose(const vector<vector<int>>& edges) {
  vector<vector<int>> new_edges(edges.size());
  for (int i = 0; i < edges.size(); i++) {
    for (int other : edges[i]) {
      new_edges[other].push_back(i);
    }
  }
  return new_edges;
}
vector<vector<int>> Kosaraju(const vector<vector<int>>& edges) {
  vector<int> post = graph_whole_postorder(edges);
  vector<vector<int>> transposed = graph_transpose(edges);
  vector<vector<int>> res;
  vector<bool> visited(edges.size(), false);
  for (int i = post.size() - 1; i >= 0; i--) {
    int node = post[i];
    if (visited[node]) continue;
    vector<int> reach;
    stack<int> dfs;
    dfs.push(node);
    visited[node] = true;
    while (!dfs.empty()) {
      int node = dfs.top();
      dfs.pop();
      reach.push_back(node);
      for (int other : transposed[node]) {
        if (!visited[other]) {
          visited[other] = true;
          dfs.push(other);
        }
      }
    }
    res.push_back(reach);
  }
  return res;
}
struct Fenwick {
  long long _n;
  vector<long long> _data;
  Fenwick(long long n) : _n(n), _data(_n + 1, 0) {}
  void Update(long long ind, long long val) {
    ind++;
    while (ind <= _n) {
      _data[ind] += val;
      ind += ind & -ind;
    }
  }
  long long Get(long long ind) {
    ind++;
    long long sum = 0;
    while (ind > 0) {
      sum += _data[ind];
      ind -= ind & -ind;
    }
    return sum;
  }
  long long Get(long long l, long long r) { return Get(r) - Get(l - 1); }
};
struct DifferenceFenwick {
  long long _n;
  vector<long long> _data;
  DifferenceFenwick(long long n) : _n(n), _data(_n + 2, 0) {}
  void Update(long long ind, long long val) {
    ind++;
    while (ind <= _n) {
      _data[ind] += val;
      ind += ind & -ind;
    }
  }
  void Update(long long l, long long r, long long val) {
    Update(l, val);
    Update(r + 1, -val);
  }
  int Get(long long ind) {
    ind++;
    long long sum = 0;
    while (ind > 0) {
      sum += _data[ind];
      ind -= ind & -ind;
    }
    return sum;
  }
};
vector<int> Dijkstra(const vector<vector<pair<int, int>>>& edges, int node) {
  int n = static_cast<int>(edges.size());
  vector<int> dist(n, numeric_limits<int>::max());
  dist[node] = 0;
  for (auto& edge : edges[node]) {
    dist[edge.first] = edge.second;
  }
  set<pair<int, int>> unvisited_nodes;
  for (int i = 0; i < n; i++) {
    if (i == node) continue;
    unvisited_nodes.insert({dist[i], i});
  }
  while (!unvisited_nodes.empty()) {
    pair<int, int> nearest = *unvisited_nodes.begin();
    unvisited_nodes.erase(unvisited_nodes.begin());
    if (nearest.first == numeric_limits<int>::max()) break;
    int nearest_node = nearest.second;
    for (auto& edge : edges[nearest_node]) {
      if (edge.second + dist[nearest_node] < dist[edge.first]) {
        pair<int, int> relaxation_node = {dist[edge.first], edge.first};
        unvisited_nodes.erase(relaxation_node);
        relaxation_node.first = edge.second + dist[nearest_node];
        unvisited_nodes.insert(relaxation_node);
        dist[edge.first] = edge.second + dist[nearest_node];
      }
    }
  }
  for (unsigned i = 0; i < dist.size(); i++) {
    if (dist[i] == numeric_limits<int>::max()) dist[i] = -1;
  }
  return dist;
}
int main() {
  ios_base::sync_with_stdio(false);
  bool pos = false;
  bool neg = false;
  int n;
  cin >> n;
  vector<int> x(n), y(n);
  int maxy = 0;
  int minx = numeric_limits<int>::max();
  int maxx = 0;
  for (int i = 0; i < n; i++) {
    int xi, yi;
    cin >> xi >> yi;
    x[i] = xi;
    y[i] = yi;
    if (yi < 0) neg = true;
    if (yi > 0) pos = true;
    maxy = max(maxy, abs(yi));
    minx = min(minx, xi);
    maxx = max(maxx, xi);
  }
  if (pos && neg) {
    cout << -1 << endl;
    return 0;
  }
  if (neg) {
    for (int i = 0; i < n; i++) y[i] *= -1;
  }
  double lim = 1e-7 / 2;
  double low = (double)maxy / 2;
  double high = (1e7 * 1e7 + 1) / 2;
  while ((high - low > high * lim &&
          !(fabs((high - low) - (high * lim)) < (1e-7)))) {
    double mid;
    if ((low > 1 && !(fabs((low) - (1)) < (1e-7)))) {
      mid = sqrt(high) * sqrt(low);
    } else {
      mid = (high + low) / 2;
    }
    bool can = true;
    double l = -1e7, r = 1e7;
    for (int i = 0; i < n; i++) {
      double ydiff = fabs(y[i] - mid);
      if (ydiff > mid && !(fabs((ydiff) - (mid)) < (1e-7))) {
        can = false;
        break;
      }
      double xdiff = sqrt(mid - ydiff) * sqrt(mid + ydiff);
      l = max(l, x[i] - xdiff);
      r = min(r, x[i] + xdiff);
    }
    if (can) {
      can = !(r < l && !(fabs((r) - (l)) < (1e-7)));
    }
    if (can) {
      high = mid;
    } else {
      low = mid;
    }
  }
  cout << setprecision(7) << fixed << high << endl;
  return 0;
}