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;
const int N = 1e5 + 7;
const double eps = 1e-7;
int n, k, a, b, w, h, q;
double k1[N], b1[N];
struct query {
  int x, y, t;
} e[N], g[N];
struct del {
  int op, t;
  double a, b, c, d;
} f[N];
struct node {
  double a, b;
};
struct polygon {
  int n;
  double x[8], y[8];
};
inline bool cmp(query a, query b) {
  if (a.t == b.t) {
    if (a.x == b.x) return a.y < b.y;
    return a.x < b.x;
  }
  return a.t < b.t;
}
inline node getnode(int a, int b, int c, int d) {
  if (b < d) swap(a, c), swap(b, d);
  node f;
  if (a == c) {
    f.a = f.b = a;
    return f;
  }
  f.a = c - 1.0 * (a - c) / (b - d) * d,
  f.b = a + 1.0 * (a - c) / (b - d) * (h - b);
  return f;
}
inline bool check(double v) { return (-eps <= v && v <= eps); }
inline polygon getpolygon2(double a, double b, double c) {
  polygon w;
  w.n = 4;
  w.x[1] = a - c, w.y[1] = b - c;
  w.x[2] = a - c, w.y[2] = b + c;
  w.x[3] = a + c, w.y[3] = b + c;
  w.x[4] = a + c, w.y[4] = b - c;
  return w;
}
inline polygon getpolygon1(double k, double b, double l, double r, double c) {
  if (l + eps >= r - eps) {
    return getpolygon2(l, l * k + b, c);
  }
  polygon w;
  double yl = l * k + b, yr = r * k + b;
  if (k >= 0) {
    w.n = 6;
    w.x[1] = l - c, w.y[1] = yl - c;
    w.x[2] = l - c, w.y[2] = yl + c;
    w.x[3] = r - c, w.y[3] = yr + c;
    w.x[4] = r + c, w.y[4] = yr + c;
    w.x[5] = r + c, w.y[5] = yr - c;
    w.x[6] = l + c, w.y[6] = yl - c;
  } else {
    w.n = 6;
    w.x[1] = l - c, w.y[1] = yl + c;
    w.x[2] = l + c, w.y[2] = yl + c;
    w.x[3] = r + c, w.y[3] = yr + c;
    w.x[4] = r + c, w.y[4] = yr - c;
    w.x[5] = r - c, w.y[5] = yr - c;
    w.x[6] = l - c, w.y[6] = yl - c;
  }
  return w;
}
inline double getval(double f1, double f2, double f3, double f4, double f5,
                     double f6) {
  f1 -= f5, f2 -= f6, f3 -= f5, f4 -= f6;
  return f1 * f4 - f2 * f3;
}
inline bool solve(double v) {
  double l = a, r = a;
  for (int i = 2; i <= q; i++) {
    double g = (f[i].t - f[i - 1].t) * v;
    polygon c;
    if (f[i - 1].op == 1) c = getpolygon1(k1[i - 1], b1[i - 1], l, r, g);
    if (f[i - 1].op == 2) c = getpolygon2(k1[i - 1], b1[i - 1], g);
    c.x[c.n + 1] = c.x[1], c.y[c.n + 1] = c.y[1];
    if (f[i].op == 1) {
      double v[10];
      int len = 0;
      for (int x = 1; x <= c.n; x++) {
        double a, b;
        if (check(c.x[x] - c.x[x + 1])) {
          a = c.x[x], b = k1[i] * a + b1[i];
        } else {
          double k2 = (c.y[x] - c.y[x + 1]) / (c.x[x] - c.x[x + 1]),
                 b2 = c.y[x] - k2 * c.x[x];
          a = (b2 - b1[i]) / (k1[i] - k2), b = a * k1[i] + b1[i];
        }
        if (min(c.x[x], c.x[x + 1]) - eps <= a &&
            a <= max(c.x[x], c.x[x + 1]) + eps &&
            min(c.y[x], c.y[x + 1]) - eps <= b &&
            b <= max(c.y[x], c.y[x + 1]) + eps)
          v[++len] = a;
      }
      if (len == 0) return 0;
      sort(v + 1, v + len + 1);
      l = v[1], r = v[len];
      l = max(l, 0.0), r = min(r, 1.0 * w);
      double e1 = f[i].a - (w - f[i].a) / (h - f[i].b) * f[i].b;
      double e2 = f[i].a + f[i].a / (h - f[i].b) * f[i].b;
      l = max(l, e1), r = min(r, e2);
    }
    if (f[i].op == 2) {
      for (int x = 1; x <= c.n; x++) {
        if (getval(c.x[x + 1], c.y[x + 1], k1[i], b1[i], c.x[x], c.y[x]) >= eps)
          return 0;
      }
      l = r = k1[i];
    }
    if (l - eps >= r + eps) return 0;
  }
  return 1;
}
inline bool getit() {
  for (int i = 1; i <= n; i++)
    if (1ll * (h - e[i].y) * (e[i].x - a) != 1ll * (b - e[i].x) * e[i].y)
      return 0;
  return 1;
}
int main() {
  cin >> n >> w >> h >> a >> b;
  for (int i = 1; i <= n; i++) scanf("%d%d%d", &e[i].t, &e[i].x, &e[i].y);
  sort(e + 1, e + n + 1, cmp);
  if (getit()) {
    cout << 0 << endl;
    return 0;
  }
  for (int i = 1; i <= n; i++)
    if (e[i].x != e[i - 1].x || e[i].y != e[i - 1].y || e[i].t != e[i - 1].t)
      g[++k] = e[i];
  q++, f[q].op = 1, f[q].a = (a + b) * 0.5, f[q].b = h * 0.5;
  for (int i = 1; i <= k; i++) {
    int j = i;
    while (g[j + 1].t == g[i].t) j++;
    if (i == j)
      q++, f[q].op = 1, f[q].a = g[i].x, f[q].b = g[i].y, f[q].t = g[i].t;
    else {
      q++, f[q].op = 2, f[q].a = g[i].x, f[q].b = g[i].y, f[q].c = g[i + 1].x,
           f[q].d = g[i + 1].y, f[q].t = g[i].t;
      for (int x = i + 1; x <= j; x++)
        if (e[x].y == e[i].y) {
          puts("-1");
          return 0;
        }
      node h = getnode(f[q].a, f[q].b, f[q].c, f[q].d);
      for (int x = i + 2; x <= j; x++) {
        node w = getnode(e[x - 1].x, e[x - 1].y, e[x].x, e[x].y);
        if (!check(w.a - h.a) || !check(w.b - h.b)) {
          puts("-1");
          return 0;
        }
      }
      if (h.a <= -eps || w + eps <= h.a || h.b <= -eps || w + eps <= h.b) {
        puts("-1");
        return 0;
      }
      k1[q] = h.a, b1[q] = h.b;
    }
    i = j;
  }
  for (int i = 1; i <= q; i++)
    if (f[i].op == 1)
      k1[i] = (f[i].b - h) / f[i].b, b1[i] = f[i].a * h / f[i].b;
  double l = 0.000001, r = 1000, ans = 0;
  for (int i = 1; i <= 60; i++) {
    double d = (l + r) * 0.5;
    if (solve(d))
      ans = d, r = d;
    else
      l = d;
  }
  printf("%.9lf\n", ans);
}