Problem: Igor the analyst fell asleep on the work and had a strange dream. In the dream his desk was crowded with computer mice, so he bought a mousetrap to catch them.

The desk can be considered as an infinite plane, then the mousetrap is a rectangle which sides are parallel to the axes, and which opposite sides are located in points (x1, y1) and (x2, y2).

Igor wants to catch all mice. Igor has analysed their behavior and discovered that each mouse is moving along a straight line with constant speed, the speed of the i-th mouse is equal to (vix, viy), that means that the x coordinate of the mouse increases by vix units per second, while the y coordinates increases by viy units. The mousetrap is open initially so that the mice are able to move freely on the desk. Igor can close the mousetrap at any moment catching all the mice that are strictly inside the mousetrap.

Igor works a lot, so he is busy in the dream as well, and he asks you to write a program that by given mousetrap's coordinates, the initial coordinates of the mice and their speeds determines the earliest time moment in which he is able to catch all the mice. Please note that Igor can close the mousetrap only once.

Input

The first line contains single integer n (1 ≤ n ≤ 100 000) — the number of computer mice on the desk.

The second line contains four integers x1, y1, x2 and y2 (0 ≤ x1 ≤ x2 ≤ 100 000), (0 ≤ y1 ≤ y2 ≤ 100 000) — the coordinates of the opposite corners of the mousetrap.

The next n lines contain the information about mice.

The i-th of these lines contains four integers rix, riy, vix and viy, (0 ≤ rix, riy ≤ 100 000,  - 100 000 ≤ vix, viy ≤ 100 000), where (rix, riy) is the initial position of the mouse, and (vix, viy) is its speed.

Output

In the only line print minimum possible non-negative number t such that if Igor closes the mousetrap at t seconds from the beginning, then all the mice are strictly inside the mousetrap. If there is no such t, print -1.

Your answer is considered correct if its absolute or relative error doesn't exceed 10 - 6. 

Formally, let your answer be a, and the jury's answer be b. Your answer is considered correct if <image>.

Examples

Input

4
7 7 9 8
3 5 7 5
7 5 2 4
3 3 7 8
6 6 3 2


Output

0.57142857142857139685


Input

4
7 7 9 8
0 3 -5 4
5 0 5 4
9 9 -1 -6
10 5 -7 -10


Output

-1

Note

Here is a picture of the first sample

Points A, B, C, D - start mice positions, segments are their paths.

<image>

Then, at first time when all mice will be in rectangle it will be looks like this:

<image>

Here is a picture of the second sample

<image>

Points A, D, B will never enter rectangle.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
int n;
const int MAXN = 110000;
class vect {
 public:
  long double x, y;
  vect() {}
  vect(long double x, long double y) : x(x), y(y) {}
};
long double det(long double a, long double b, long double c, long double d) {
  return a * d - b * c;
}
const long double EPS = 1e-12;
class line {
 public:
  long double a, b, c;
  line() {}
  line(const vect &p1, const vect &p2) {
    a = p2.y - p1.y;
    b = p1.x - p2.x;
    c = -(a * p1.x + b * p1.y);
  }
};
vect intersect(line &n, line &m) {
  vect res;
  res.x = -det(n.c, n.b, m.c, m.b) / det(n.a, n.b, m.a, m.b);
  res.y = -det(n.a, n.c, m.a, m.c) / det(n.a, n.b, m.a, m.b);
  return res;
}
bool parallel(line &n, line &m) { return fabs(det(n.a, n.b, m.a, m.b)) < EPS; }
long double distvl(const vect &a, const line &l) {
  return fabs(l.a * a.x + l.b * a.y + l.c) / (sqrt(l.a * l.a + l.b * l.b));
}
class event {
 public:
  long double in, out;
  event() {}
  event(long double in, long double out) : in(in), out(out) {}
};
class sss {
 public:
  long double in;
  int type;
  sss() {}
  sss(long double in, int type) : in(in), type(type) {}
};
bool operator<(const sss &a, const sss &b) {
  if (a.in != b.in) {
    return a.in < b.in;
  } else {
    return a.type < a.type;
  }
}
long double fo(vect p, vect to, long double vx, long double vy) {
  long double x = to.x - p.x;
  long double y = to.y - p.y;
  if (fabs(vx) > EPS) {
    return x / vx;
  } else {
    return y / vy;
  }
}
bool tmm(vect p, line l1, line l2, long double vx, long double vy,
         long double dist, event &e) {
  if (fabs(vx) < EPS && fabs(vy) < EPS) {
    long double d1 = distvl(p, l1);
    long double d2 = distvl(p, l2);
    if (fabs(d1 + d2 - dist) < EPS && fabs(d1) > EPS && fabs(d2) > EPS) {
      return false;
    }
    cout << -1. << endl;
    exit(0);
  }
  line l = line(p, vect(p.x + vx, p.y + vy));
  if (parallel(l, l1)) {
    long double d1 = distvl(p, l1);
    long double d2 = distvl(p, l2);
    if (fabs(d1 + d2 - dist) < EPS && fabs(d1) > EPS && fabs(d2) > EPS) {
      return false;
    }
    cout << -1. << endl;
    exit(0);
  }
  vect p1 = intersect(l, l1);
  vect p2 = intersect(l, l2);
  long double t1 = fo(p, p1, vx, vy);
  long double t2 = fo(p, p2, vx, vy);
  if (t1 > t2) {
    swap(t1, t2);
  }
  t1 = max(t1, (long double)0);
  if (t2 < 0) {
    cout << -1 << endl;
    exit(0);
  }
  e = event(t1, t2);
  return true;
}
line a[MAXN];
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(NULL);
  cout.precision(10);
  cin >> n;
  vect p1, p2;
  cin >> p1.x >> p1.y >> p2.x >> p2.y;
  vect p3 = vect(p1.x, p2.y);
  vect p4 = vect(p2.x, p1.y);
  line l1 = line(p1, p3);
  line l2 = line(p2, p4);
  line r1 = line(p2, p3);
  line r2 = line(p1, p4);
  long double ld = fabs(p3.x - p2.x);
  long double rd = fabs(p3.y - p1.y);
  vector<sss> d;
  for (int i = 0; i < n; i++) {
    long double x, y, vx, vy;
    cin >> x >> y >> vx >> vy;
    vect p(x, y);
    event e1, e2;
    if (tmm(p, l1, l2, vx, vy, ld, e1)) {
      d.push_back(sss(e1.in + EPS, 0));
      d.push_back(sss(e1.out - EPS, 1));
    }
    if (tmm(p, r1, r2, vx, vy, rd, e2)) {
      d.push_back(sss(e2.in + EPS, 0));
      d.push_back(sss(e2.out - EPS, 1));
    }
  }
  d.push_back(sss(0, 0));
  d.push_back(sss(2e9, 1));
  sort(d.begin(), d.end());
  int cnt = 0;
  int k = d.size() / 2;
  for (int i = 0; i < d.size(); i++) {
    if (d[i].type == 0) {
      cnt++;
    } else {
      cnt--;
    }
    if (cnt == k) {
      cout << d[i].in << endl;
      return 0;
    }
  }
  cout << -1 << endl;
  return 0;
}