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;
const double PI = acos(-1.);
const double EPS = 1E-9;
int Zero(double O) { return fabs(O) <= EPS; }
struct Point {
  double x, y;
  void read() { scanf("%lf%lf", &x, &y); }
  void Print() { printf("%lf %lf\n", x, y); }
  void init(double _x, double _y) {
    x = _x;
    y = _y;
  }
  double operator*(const Point &b) const { return x * b.y - y * b.x; }
  double operator^(const Point &b) const { return x * b.x + y * b.y; }
  Point operator-(const Point &b) const { return (Point){x - b.x, y - b.y}; }
  Point operator+(const Point &b) const { return (Point){x + b.x, y + b.y}; }
  int operator<(const Point &b) const { return x < b.x || x == b.x && y < b.y; }
  int operator==(const Point &b) const {
    return Zero(x - b.x) && Zero(y - b.y);
  }
  void Rotate(double alpha) {
    double _x = x * cos(alpha) - y * sin(alpha);
    double _y = y * cos(alpha) + x * sin(alpha);
    x = _x;
    y = _y;
  }
} a[1005], b[1005], ERRORPOINT = (Point){1e99, 1e99};
struct Line {
  Point p, q;
} A[1005], B[1005];
Point Intersection(Line A, Line B) {
  Point ret = A.p;
  double u = (A.p - B.p) * (B.p - B.q);
  double v =
      (A.p.x - A.q.x) * (B.p.y - B.q.y) - (A.p.y - A.q.y) * (B.p.x - B.q.x);
  if (Zero(v)) return (Point){1e99, 1e99};
  u /= v;
  ret.x += (A.q.x - A.p.x) * u;
  ret.y += (A.q.y - A.p.y) * u;
  return ret;
}
int Inline(Line A, Point O) {
  return ((A.q - A.p) ^ (O - A.p)) >= -EPS && ((A.p - A.q) ^ (O - A.q)) >= -EPS;
}
double Calc(Point now, Point dir, Point goal) {
  goal = goal - now;
  return (goal.x + goal.y) / (dir.x + dir.y);
}
int main() {
  int n, x1, y1, x2, y2;
  scanf("%d", &n);
  scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
  static Point a[4];
  a[0].init(x1, y1);
  a[1].init(x2, y1);
  a[2].init(x2, y2);
  a[3].init(x1, y2);
  double L = 0, R = 1e100;
  for (int i = 1; i <= n; i++) {
    Point now, dir;
    Line t;
    now.read();
    dir.read();
    if (Zero(dir.x) && Zero(dir.y)) {
      if (now.x >= x1 + EPS && now.x <= x2 - EPS && now.y >= y1 + EPS &&
          now.y <= y2 - EPS)
        continue;
      return puts("-1"), 0;
    }
    if (dir.y == 0 && (now.y == y1 || now.y == y2)) return puts("-1"), 0;
    if (dir.x == 0 && (now.x == x1 || now.x == x2)) return puts("-1"), 0;
    t.p = now;
    t.q = now + dir;
    vector<Point> cur;
    cur.clear();
    for (int k = 0; k < 4; k++) {
      Line l;
      l.p = a[k];
      l.q = a[(k + 1) % 4];
      Point g = Intersection(l, t);
      if (g == ERRORPOINT || !Inline(l, g)) continue;
      cur.push_back(g);
      for (int v = 0; v + 1 < cur.size(); v++)
        if (g == cur[v]) {
          cur.pop_back();
          break;
        }
    }
    if (cur.size() <= 1) return puts("-1"), 0;
    assert(cur.size() == 2);
    double Time1 = Calc(now, dir, cur[0]);
    double Time2 = Calc(now, dir, cur[1]);
    Time1 = max(Time1, 0.);
    Time2 = max(Time2, 0.);
    if (Time1 > Time2) swap(Time1, Time2);
    L = max(L, Time1);
    R = min(R, Time2);
  }
  if (L + 1e-11 >= R || L > R) return puts("-1"), 0;
  printf("%.10f\n", L);
}