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 read() {
  int f = 1, sum = 0;
  char x = getchar();
  for (; (x < '0' || x > '9'); x = getchar())
    if (x == '-') f = -1;
  for (; x >= '0' && x <= '9'; x = getchar()) sum = sum * 10 + x - '0';
  return f * sum;
}
int n, w, h, e1, e2;
struct node {
  double l, r;
};
struct point {
  int t;
  double x, y;
  inline void in() { t = read(), x = read(), y = read(); }
} p[200005];
inline bool check(double v) {
  node a, t, tmp;
  a.l = a.r = e1;
  for (int i = 1, las = 0; i <= n; las = p[i].t, ++i) {
    las = p[i].t - las;
    double k[4] = {0, 1 - h / p[i - 1].y, 1 - h / p[i].y, 1 - h / p[i - 1].y};
    double b[4] = {0, h * p[i - 1].x / p[i - 1].y - las * v,
                   h * p[i].x / p[i].y, h * p[i - 1].x / p[i - 1].y + las * v};
    b[3] -= b[2], k[3] /= k[2], b[3] /= k[2];
    b[1] -= b[2], k[1] /= k[2], b[1] /= k[2];
    tmp.l = 1e9, tmp.r = -1e9;
    t.l = ((a.l - las * v) > (k[3] * a.l + b[3]) ? (a.l - las * v)
                                                 : (k[3] * a.l + b[3]));
    t.r = ((a.l + las * v) < (k[1] * a.l + b[1]) ? (a.l + las * v)
                                                 : (k[1] * a.l + b[1]));
    if (t.l < t.r + 1e-10)
      tmp.l = ((tmp.l) < (t.l) ? (tmp.l) : (t.l)),
      tmp.r = ((tmp.r) > (t.r) ? (tmp.r) : (t.r));
    t.l = ((a.r - las * v) > (k[3] * a.r + b[3]) ? (a.r - las * v)
                                                 : (k[3] * a.r + b[3]));
    t.r = ((a.r + las * v) < (k[1] * a.r + b[1]) ? (a.r + las * v)
                                                 : (k[1] * a.r + b[1]));
    if (t.l < t.r + 1e-10)
      tmp.l = ((tmp.l) < (t.l) ? (tmp.l) : (t.l)),
      tmp.r = ((tmp.r) > (t.r) ? (tmp.r) : (t.r));
    if (k[3] != 1) {
      double x = (b[3] + las * v) / (1 - k[3]);
      if (x > a.l && x < a.r) {
        x -= las * v;
        tmp.l = ((tmp.l) < (x) ? (tmp.l) : (x)),
        tmp.r = ((tmp.r) > (x) ? (tmp.r) : (x));
      }
      x = (las * v - b[3]) / (k[3] - 1);
      if (x > a.l && x < a.r) {
        x += las * v;
        tmp.l = ((tmp.l) < (x) ? (tmp.l) : (x)),
        tmp.r = ((tmp.r) > (x) ? (tmp.r) : (x));
      }
    }
    if (k[1] != 1) {
      double x = (las * v - b[1]) / (k[1] - 1);
      if (x + 1e-10 > a.l && x < a.r + 1e-10) {
        x += las * v;
        tmp.l = ((tmp.l) < (x) ? (tmp.l) : (x)),
        tmp.r = ((tmp.r) > (x) ? (tmp.r) : (x));
      }
      x = (las * v + b[1]) / (1 - k[1]);
      if (x + 1e-10 > a.l && x < a.r + 1e-10) {
        x -= las * v;
        tmp.l = ((tmp.l) < (x) ? (tmp.l) : (x)),
        tmp.r = ((tmp.r) > (x) ? (tmp.r) : (x));
      }
    }
    a = tmp;
    tmp.r = h * p[i].x / (h - p[i].y);
    tmp.l = (w * p[i].y - p[i].x * h) / (p[i].y - h);
    a.l = ((a.l) > (tmp.l) ? (a.l) : (tmp.l));
    a.r = ((a.r) < (tmp.r) ? (a.r) : (tmp.r));
    a.l = ((a.l) > (0) ? (a.l) : (0)), a.r = ((a.r) < (w) ? (a.r) : (w));
    if (a.l > a.r + 1e-10) return 0;
  }
  return 1;
}
int main() {
  n = read(), w = read(), h = read(), e1 = read(), e2 = read();
  p[0].x = (e1 + e2) / 2.0, p[0].y = h / 2.0;
  for (int i = 1; i <= n; ++i) p[i].in();
  double l = 0, r = 1e3 + 5, mid;
  for (int i = 1; i <= 100; ++i) {
    mid = (l + r) / 2;
    if (check(mid))
      r = mid;
    else
      l = mid;
  }
  if (r > 1000)
    puts("-1");
  else
    printf("%.10f\n", r);
}