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;
inline int gi() {
  int f = 1, sum = 0;
  char ch = getchar();
  while (ch > '9' || ch < '0') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    sum = (sum << 3) + (sum << 1) + ch - '0';
    ch = getchar();
  }
  return f * sum;
}
const int N = 100010;
struct node {
  double x, y;
  node operator+(const node b) const { return (node){x + b.x, y + b.y}; }
  node operator-(const node b) const { return (node){x - b.x, y - b.y}; }
  node operator*(const double b) const { return (node){x * b, y * b}; }
  double len() { return sqrt(x * x + y * y); }
};
double cross(node a, node b) { return a.x * b.y - a.y * b.x; }
node st, p[N][2];
double T[N], w, h;
int n;
const double eps = 1e-8;
bool cmp(node a, node b) { return a.y < b.y || (a.y == b.y && a.x < b.x); }
bool cmp2(node a, node b) {
  return cross(a, b) > 0 || (fabs(cross(a, b)) < eps && a.len() < b.len());
}
node s[N];
void Graham(node *p, int &cnt) {
  sort(p + 1, p + cnt + 1, cmp);
  node base = p[1];
  for (int i = 1; i <= cnt; i++) p[i] = p[i] - base;
  sort(p + 1, p + cnt + 1, cmp2);
  int top = 0;
  for (int i = 1; i <= cnt; i++) {
    if (i != 1 && (p[i] - p[i - 1]).len() < eps) continue;
    while (top > 1 && cross(p[i] - s[top - 1], s[top] - s[top - 1]) >= 0) top--;
    s[++top] = p[i];
  }
  for (int i = 1; i <= top; i++) p[i] = s[i] + base;
  cnt = top;
  return;
}
bool In_it(node *c, int n, node x) {
  if (n == 1) return (c[1] - x).len() < eps;
  if (n == 2)
    return fabs((c[1] - c[2]).len() - (c[1] - x).len() - (c[2] - x).len()) <
           eps;
  for (int i = 1; i <= n; i++)
    if (cross(c[i + 1] - c[i], x - c[i]) < 0) return 0;
  return 1;
}
bool Intersection(node A1, node A2, node B1, node 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;
}
node GetIntersection(node A1, node A2, node B1, node 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 + (A2 - A1) * t;
}
bool check(double v) {
  node Left = st, Right = st;
  node Sqr[4] = {(node){v, v}, (node){v, -v}, (node){-v, v}, (node){-v, -v}};
  for (int i = 1; i <= n; i++) {
    int cnt = 0, ncnt = 0;
    node c[10], nn[10];
    for (int j = 0; j < 4; j++)
      c[++cnt] = Left + Sqr[j] * (T[i] - T[i - 1]),
      c[++cnt] = Right + Sqr[j] * (T[i] - T[i - 1]);
    Graham(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])) {
        node O = GetIntersection(c[j], c[j + 1], p[i][0], p[i][1]);
        if (ncnt == 0 || (nn[ncnt - 1] - O).len() > eps) nn[ncnt++] = O;
      }
    }
    if (ncnt == 0) {
      if (In_it(c, cnt, p[i][0]) && In_it(c, cnt, p[i][1]))
        nn[ncnt++] = p[i][0], nn[ncnt++] = p[i][1];
      else if (In_it(c, cnt, p[i][0]))
        nn[0] = nn[1] = p[i][0], ncnt = 2;
      else if (In_it(c, cnt, p[i][1]))
        nn[0] = nn[1] = p[i][1], ncnt = 2;
      else
        return false;
    } else if (ncnt == 1) {
      if (In_it(c, cnt, p[i][0]))
        nn[ncnt++] = p[i][0];
      else if (In_it(c, cnt, p[i][1]))
        nn[ncnt++] = p[i][1];
      else
        nn[1] = nn[0], ++ncnt;
    }
    Left = nn[0];
    Right = nn[1];
  }
  return true;
}
int main() {
  n = gi();
  scanf("%lf%lf", &w, &h);
  scanf("%lf%lf", &st.x, &st.y);
  for (int i = 1; i <= n; i++) {
    double a, b;
    scanf("%lf%lf%lf", &T[i], &a, &b);
    double lx = 0, rx = w, ly = 0, ry = w;
    lx = max(lx, a - b * (w - a) / (h - b));
    ly = max(ly, a - (w - a) * (h - b) / b);
    rx = min(rx, a + a * b / (h - b));
    ry = min(ry, a + a * (h - b) / b);
    p[i][0] = (node){lx, ry};
    p[i][1] = (node){rx, ly};
  }
  double l = 0, r = w * 2, ans = -1;
  while (r - l > eps) {
    double mid = (l + r) / 2;
    if (check(mid)) {
      r = mid;
      ans = mid;
    } else
      l = mid;
  }
  printf("%.7lf\n", ans);
  return 0;
}