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;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
const int MAXN = 100000;
const double eps = 1e-15;
struct P {
  double x, y;
  P() {}
  P(double x, double y) : x(x), y(y) {}
};
P operator-(const P &a, const P &b) { return P(a.x - b.x, a.y - b.y); }
struct State {
  int t;
  double lux, hux, a, b;
  State() {}
  State(int t, double lux, double hux, double a, double b)
      : t(t), lux(lux), hux(hux), a(a), b(b) {}
};
int np, w, h;
int sux, svx;
int pt[MAXN], px[MAXN], py[MAXN];
State e[MAXN + 1];
int ne;
bool intersect(vector<P> &hull, double a, double b, double &l, double &h) {
  bool ret = false;
  for (int i = (0); i < (((int)(hull).size())); ++i) {
    P c = hull[i], d = hull[(i + 1) % ((int)(hull).size())], e = d - c;
    double s, t;
    if (fabs(e.x) == 0 && fabs(e.y) == 0) {
      if (fabs(a * c.x + b - c.y) > eps) continue;
      s = c.x, t = 0;
    } else if (fabs(e.x) == 0) {
      s = c.x, t = (a * c.x + b - c.y) / e.y;
    } else {
      double num = (c.y - b) * e.x - c.x * e.y, den = a * e.x - e.y;
      if (fabs(den) < eps) continue;
      s = num / den, t = (s - c.x) / e.x;
    }
    if (t < 0 || t > 1) continue;
    if (!ret)
      ret = true, l = h = s;
    else
      l = min(l, s), h = max(h, s);
  }
  return ret;
}
bool proceed(State &cur, const State &dst, double v) {
  int dt = dst.t - cur.t;
  double dx = v * dt;
  vector<P> hull;
  hull.push_back(P(cur.lux + dx, cur.a * cur.lux + cur.b + dx));
  hull.push_back(P(cur.lux - dx, cur.a * cur.lux + cur.b + dx));
  if (fabs(cur.lux - cur.hux) > eps)
    hull.push_back(P(cur.lux - dx, cur.a * cur.lux + cur.b - dx));
  hull.push_back(P(cur.hux - dx, cur.a * cur.hux + cur.b - dx));
  hull.push_back(P(cur.hux + dx, cur.a * cur.hux + cur.b - dx));
  if (fabs(cur.lux - cur.hux) > eps)
    hull.push_back(P(cur.hux + dx, cur.a * cur.hux + cur.b + dx));
  double l, h;
  if (!intersect(hull, dst.a, dst.b, l, h)) return false;
  l = max(l, dst.lux), h = min(h, dst.hux);
  if (l > h + eps) return false;
  cur = State(dst.t, l, h, dst.a, dst.b);
  return true;
}
bool can(double v) {
  State cur = e[0];
  for (int i = (1); i < (ne); ++i)
    if (!proceed(cur, e[i], v)) return false;
  return true;
}
double solve() {
  ne = 0;
  e[ne++] = State(0, sux, sux, 0, svx);
  for (int l = 0, r = l; l < np; l = r) {
    while (r < np && pt[l] == pt[r]) ++r;
    int a = -1, b = -1;
    for (int i = (l); i < (r); ++i) {
      if (a == -1) a = i;
      if (px[a] == px[i] && py[a] == py[i]) continue;
      if (b == -1) b = i;
      int dx1 = px[b] - px[a], dy1 = py[b] - py[a], dx2 = px[i] - px[a],
          dy2 = py[i] - py[a];
      if ((long long)dx1 * dy2 - (long long)dy1 * dx2 != 0) return -1;
    }
    if (b == -1) {
      int den = h - py[a], luxnum = max(0, h * px[a] - w * py[a]),
          huxnum = min(w * den, px[a] * h);
      if (luxnum > huxnum) return -1;
      e[ne++] = State(pt[a], 1.0 * luxnum / den, 1.0 * huxnum / den,
                      1 - 1.0 * h / py[a], 1.0 * h * px[a] / py[a]);
    } else {
      int dx = px[b] - px[a], dy = py[b] - py[a];
      if (dy == 0) return -1;
      int den = dy, uxnum = px[a] * dy - py[a] * dx,
          vxnum = px[a] * dy + (h - py[a]) * dx;
      if (den < 0) den = -den, uxnum = -uxnum, vxnum = -vxnum;
      if (uxnum < 0 || uxnum > w * den || vxnum < 0 || vxnum > w * den)
        return -1;
      e[ne++] = State(pt[a], 1.0 * uxnum / den, 1.0 * uxnum / den, 0,
                      1.0 * vxnum / den);
    }
  }
  double l = 0, h = w;
  for (int rep = (0); rep < (100); ++rep) {
    double m = l + (h - l) / 2;
    if (can(m))
      h = m;
    else
      l = m;
  }
  return h;
}
void run() {
  scanf("%d%d%d", &np, &w, &h);
  scanf("%d%d", &sux, &svx);
  for (int i = (0); i < (np); ++i) scanf("%d%d%d", &pt[i], &px[i], &py[i]);
  double ans = solve();
  if (ans < 0) {
    printf("-1\n");
    return;
  }
  printf("%.15lf\n", ans);
}
int main() {
  run();
  return 0;
}