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 long double EPS = 1e-12;
const long double INF = 1e30;
bool eq(long double a, long double b) { return abs(a - b) < EPS; }
bool gr(long double a, long double b) { return a >= b + EPS; }
bool gr_eq(long double a, long double b) { return a > b - EPS; }
struct Point {
  long double x, y;
  Point() {}
  Point(long double xx, long double yy) {
    x = xx;
    y = yy;
  }
  bool operator<(const Point a) const {
    if (eq(a.x, x)) {
      return gr(a.y, y);
    } else {
      return gr(a.x, x);
    }
  }
};
struct Vector {
  long double x, y;
  Vector() {}
  Vector(Point p1, Point p2) {
    x = p2.x - p1.x;
    y = p2.y - p1.y;
  }
  Vector(long double xx, long double yy) {
    x = xx;
    y = yy;
  }
  long double dist() { return hypotl(x, y); }
};
long double operator*(Vector a, Vector b) { return (a.x * b.x + a.y * b.y); }
long double operator%(Vector a, Vector b) { return (a.x * b.y - a.y * b.x); }
Vector operator+(Vector a, Vector b) { return Vector(a.x + b.x, a.y + b.y); }
Point operator+(Point a, Vector b) { return Point(a.x + b.x, a.y + b.y); }
struct Line {
  long double a, b, c;
  Line() {}
  Line(Point p1, Point p2) {
    a = -(p2.y - p1.y);
    b = p2.x - p1.x;
    c = -a * p1.x - b * p1.y;
    long double d = hypotl(a, b);
    a /= d;
    b /= d;
    c /= d;
  }
};
struct Segm {
  Point p1, p2;
  Line l;
  Segm() {}
  Segm(Point pp1, Point pp2) {
    p1 = pp1;
    p2 = pp2;
    l = Line(p1, p2);
  }
};
bool point_on_segm(Point p, Segm s) {
  Vector v1(p, s.p1);
  Vector v2(p, s.p2);
  return gr_eq(0, v1 * v2);
}
Point intersect_line(Line l1, Line l2) {
  long double d = l1.a * l2.b - l1.b * l2.a;
  if (eq(d, 0)) {
    return Point(INF, INF);
  }
  return Point((l1.b * l2.c - l1.c * l2.b) / d,
               (l1.c * l2.a - l1.a * l2.c) / d);
}
bool intersect_line2(Line l1, Line l2) {
  bool fl1 = eq(l1.a * l2.b, l1.b * l2.a);
  bool fl2 = eq(l1.b * l2.c, l1.c * l2.b);
  bool fl3 = eq(l1.a * l2.c, l1.c * l2.a);
  return (fl1 && fl2 && fl3);
}
pair<long double, long double> int_seg(pair<long double, long double> s1,
                                       pair<long double, long double> s2) {
  long double l = max(s1.first, s2.first);
  long double r = min(s1.second, s2.second);
  if (gr(r, l)) {
    return {l, r};
  } else {
    return {0, 0};
  }
}
bool point_in_polygon(Point p, Segm* vec, int n) {
  for (int i = 0; i < n; ++i) {
    if (gr_eq(vec[i].l.c, -vec[i].l.a * p.x - vec[i].l.b * p.y)) {
      ;
    } else {
      return false;
    }
  }
  return true;
}
bool point_in_polygon2(Point p, Segm* vec, int n) {
  for (int i = 0; i < n; ++i) {
    if (gr(vec[i].l.c, -vec[i].l.a * p.x - vec[i].l.b * p.y)) {
      ;
    } else {
      return false;
    }
  }
  return true;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  long double x1, y1, x2, y2;
  cin >> x1 >> y1 >> x2 >> y2;
  Segm rec[4];
  rec[0] = Segm(Point(x1, y1), Point(x2, y1));
  rec[1] = Segm(Point(x2, y1), Point(x2, y2));
  rec[2] = Segm(Point(x2, y2), Point(x1, y2));
  rec[3] = Segm(Point(x1, y2), Point(x1, y1));
  vector<pair<long double, long double>> vec;
  for (int i = 0; i < n; ++i) {
    Point mc;
    cin >> mc.x >> mc.y;
    Vector mc_v;
    cin >> mc_v.x >> mc_v.y;
    if (eq(0, mc_v.dist())) {
      if (point_in_polygon2(mc, rec, 4)) {
        vec.push_back({0, INF});
      } else {
        vec.push_back({0, 0});
      }
      continue;
    }
    set<Point> per;
    for (int i = 0; i < 4; ++i) {
      if (intersect_line2(rec[i].l, Line(mc, mc + mc_v))) {
        per.clear();
        break;
      }
      Point cur_p = intersect_line(rec[i].l, Line(mc, mc + mc_v));
      if (point_on_segm(cur_p, rec[i]) && gr(mc_v * Vector(mc, cur_p), 0)) {
        per.insert(cur_p);
      }
    }
    if (per.size() == 0) {
      vec.push_back({0, 0});
    } else if (per.size() == 1) {
      if (point_in_polygon(mc, rec, 4)) {
        vec.push_back({0, Vector(mc, *per.begin()).dist() / mc_v.dist()});
      } else {
        vec.push_back({0, 0});
      }
    } else {
      long double tm1 = Vector(mc, *per.begin()).dist() / mc_v.dist();
      per.erase(per.begin());
      long double tm2 = Vector(mc, *per.begin()).dist() / mc_v.dist();
      vec.push_back({min(tm1, tm2), max(tm1, tm2)});
    }
  }
  while (vec.size() >= 2) {
    auto a = vec.back();
    vec.pop_back();
    auto b = vec.back();
    vec.pop_back();
    vec.push_back(int_seg(a, b));
  }
  cout.precision(30);
  if (gr(vec[0].second, vec[0].first)) {
    cout << vec[0].first << endl;
  } else {
    cout << -1 << endl;
  }
  return 0;
}