Problem: A lot of people dream of convertibles (also often called cabriolets). Some of convertibles, however, don't have roof at all, and are vulnerable to rain. This is why Melon Ask, the famous inventor, decided to create a rain protection mechanism for convertibles.

The workplace of the mechanism is a part of plane just above the driver. Its functional part consists of two rails with sliding endpoints of a piece of stretching rope. For the sake of simplicity we can consider this as a pair of parallel segments in a plane with the rope segment, whose endpoints we are free to choose as any points on these rails segments.

<image>

The algorithmic part of the mechanism detects each particular raindrop and predicts when and where it reaches the plane. At this exact moment the rope segment must contain the raindrop point (so the rope adsorbs the raindrop).

You are given the initial position of the rope endpoints and all information about raindrops. You are to choose the minimal possible speed v of the endpoints sliding (both endpoints can slide in any direction along their segments independently of each other) in such a way that it is possible to catch all raindrops moving both endpoints with speed not greater than v, or find out that it's impossible no matter how high the speed is.

Input

The first line contains three integers n, w and h (1 ≤ n ≤ 10^5, 1≤ w, h ≤ 10^3), meaning that there are n raindrops, and two rails are represented as segments connecting (0, 0) and (w, 0) and connecting (0, h) and (w, h).

The second line contains two integers e_1 and e_2, meaning that the initial (that is, at the moment t = 0) positions of the endpoints are (e_1, 0) and (e_2, h) (0≤ e_1, e_2≤ w).

The i-th of the following n lines contains three integers t_i, x_i and y_i (1≤ t_i≤ 10^5, 0≤ x_i ≤ w, 0 < y_i < h) meaning that the i-th raindrop touches the plane at the point (x_i, y_i) at the time moment t_i. It is guaranteed that t_i ≤ t_{i+1} for all valid i.

Output

If it is impossible to catch all raindrops, print -1.

Otherwise, print the least possible maximum speed of the rope endpoints for which it is possible to catch them all. Your answer is considered correct if the absolute or relative error doesn't exceed 10^{-4}.

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^{-4}.

Examples

Input

3 5 5
0 0
1 1 4
2 2 4
3 3 4


Output

1.0000000019


Input

2 5 5
0 0
2 4 1
3 1 4


Output

2.1428571437


Input

3 5 5
0 0
1 2 1
1 3 3
1 4 2


Output

-1

Note

That is how one can act in the first sample test:

<image>

Here is the same for the second:

<image>

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
class Point {
 public:
  double x, y;
  double len() { return sqrt(((x) * (x)) + ((y) * (y))); }
};
const int maxN = 101000;
const double eps = 1e-8;
int n, W, H;
int Ti[maxN];
Point st, P[maxN][2];
Point operator+(Point A, Point B);
Point operator-(Point A, Point B);
Point operator*(double rate, Point A);
ostream &operator<<(ostream &os, Point A);
bool cmpx(Point A, Point B);
bool cmpc(Point A, Point B);
double Cross(Point A, Point B);
void Convex(Point *P, int &n);
bool Inconvex(Point *C, int n, Point p);
bool check(double dt);
bool Intersection(Point A1, Point A2, Point B1, Point B2);
Point GetIntersection(Point A1, Point A2, Point B1, Point B2);
int main() {
  scanf("%d%d%d", &n, &W, &H);
  scanf("%lf%lf", &st.x, &st.y);
  for (int i = 1; i <= n; i++) {
    double a, b;
    scanf("%d%lf%lf", &Ti[i], &a, &b);
    double rate = b / H, lx = 0, rx = W, ly = 0, ry = W;
    lx = max(lx, a - b * (W - a) / (H - b));
    rx = min(rx, a * b / (H - b) + a);
    ly = max(ly, a - (H - b) * (W - a) / b);
    ry = min(ry, a * (H - b) / b + a);
    P[i][0] = ((Point){lx, ry});
    P[i][1] = ((Point){rx, ly});
  }
  double l = 0, r = W + W, Ans = -1;
  while (l + (1e-4) < r) {
    double mid = (l + r) / 2;
    if (check(mid))
      Ans = mid, r = mid - eps;
    else
      l = mid + eps;
  }
  if (Ans < 0)
    printf("-1\n");
  else
    printf("%.10lf\n", Ans);
  return 0;
}
Point operator+(Point A, Point B) { return ((Point){A.x + B.x, A.y + B.y}); }
Point operator-(Point A, Point B) { return ((Point){A.x - B.x, A.y - B.y}); }
Point operator*(double rate, Point A) {
  return ((Point){A.x * rate, A.y * rate});
}
ostream &operator<<(ostream &os, Point A) {
  os << "(" << A.x << "," << A.y << ")";
  return os;
}
bool cmpx(Point A, Point B) {
  if (A.y != B.y) return A.y < B.y;
  return A.x < B.x;
}
bool cmpc(Point A, Point B) {
  return Cross(A, B) > 0 || (fabs(Cross(A, B)) < eps && A.len() < B.len());
}
double Cross(Point A, Point B) { return A.x * B.y - A.y * B.x; }
void Convex(Point *P, int &n) {
  static Point Bp[maxN];
  sort(&P[1], &P[n + 1], cmpx);
  Point base = P[1];
  for (int i = 1; i <= n; i++) P[i] = P[i] - base;
  sort(&P[1], &P[n + 1], cmpc);
  int top = 0;
  for (int i = 1; i <= n; i++) {
    if (i != 1 && (P[i] - P[i - 1]).len() < eps) continue;
    while (top >= 2 && Cross(P[i] - Bp[top - 1], Bp[top] - Bp[top - 1]) >= 0)
      --top;
    Bp[++top] = P[i];
  }
  for (int i = 1; i <= top; i++) P[i] = Bp[i] + base;
  n = top;
  return;
}
bool Inconvex(Point *C, int n, Point p) {
  if (n == 1) return ((C[1] - p).len() < eps);
  if (n == 2)
    return fabs((C[2] - C[1]).len() - (C[2] - p).len() - (C[1] - p).len()) <
           eps;
  for (int i = 1; i <= n; i++)
    if (Cross(C[i + 1] - C[i], p - C[i]) < 0) return 0;
  return 1;
}
bool check(double dt) {
  Point L1 = st, L2 = st;
  Point F[4] = {(Point){dt, dt}, (Point){dt, -dt}, (Point){-dt, dt},
                (Point){-dt, -dt}};
  for (int i = 1; i <= n; i++) {
    Point C[10], N[10];
    int cnt = 0, ncnt = 0;
    for (int f = 0; f < 4; f++)
      C[++cnt] = L1 + (double)(Ti[i] - Ti[i - 1]) * F[f],
      C[++cnt] = L2 + (double)(Ti[i] - Ti[i - 1]) * F[f];
    Convex(C, cnt);
    C[cnt + 1] = C[1];
    for (int j = 1; j <= cnt; j++)
      if (Intersection(C[j], C[j + 1], P[i][0], P[i][1])) {
        Point R = GetIntersection(C[j], C[j + 1], P[i][0], P[i][1]);
        if (ncnt == 0 || (N[ncnt - 1] - R).len() > eps) N[ncnt++] = R;
      }
    if (ncnt == 0) {
      if (Inconvex(C, cnt, P[i][0]) && Inconvex(C, cnt, P[i][1]))
        N[ncnt++] = P[i][0], N[ncnt++] = P[i][1];
      else if (Inconvex(C, cnt, P[i][0]))
        N[0] = N[1] = P[i][0], ncnt = 2;
      else if (Inconvex(C, cnt, P[i][1]))
        N[0] = N[1] = P[i][1], ncnt = 2;
      else
        return 0;
    } else if (ncnt == 1) {
      if (Inconvex(C, cnt, P[i][0]))
        N[ncnt++] = P[i][0];
      else if (Inconvex(C, cnt, P[i][1]))
        N[ncnt++] = P[i][1];
      else
        N[1] = N[0], ++ncnt;
    }
    L1 = N[0];
    L2 = N[1];
  }
  return 1;
}
bool Intersection(Point A1, Point A2, Point B1, Point B2) {
  if ((A1 - A2).len() < eps && (B1 - B2).len() < eps)
    return (fabs(A1.x - B1.x) < eps) && (fabs(A1.y - B1.y) < eps);
  if ((A1 - A2).len() < eps) swap(A1, B1), swap(A2, B2);
  if ((B1 - B2).len() < eps)
    return fabs((A1 - A2).len() - (A1 - B1).len() - (A2 - B1).len()) < eps;
  return (Cross(B2 - B1, A1 - B1) * Cross(B2 - B1, A2 - B1) <= 0) &&
         (Cross(A2 - A1, B1 - A1) * Cross(A2 - A1, B2 - A1) <= 0);
}
Point GetIntersection(Point A1, Point A2, Point B1, Point B2) {
  if ((B1 - B2).len() < eps && (A1 - A2).len() < eps) return A1;
  if ((A1 - A2).len() < eps) return A1;
  if ((B1 - B2).len() < eps) return B1;
  if ((A1 - B1).len() < eps) return A1;
  if ((A1 - B2).len() < eps) return A1;
  if ((A2 - B1).len() < eps) return A2;
  if ((A2 - B2).len() < eps) return A2;
  double t = fabs(Cross(B2 - B1, A1 - B1) / Cross(A2 - A1, B2 - B1));
  return A1 + t * (A2 - A1);
}