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 double eps = 1e-10;
int n, t;
double w, h;
double a, b;
double x, y;
struct P {
  double x, y;
  double operator*(const P &a) const { return x * a.y - a.x * y; }
  P operator-(const P &a) const { return (P){x - a.x, y - a.y}; }
};
vector<vector<P> > tim(100001);
vector<vector<double> > event;
vector<double> cur;
bool check() {
  for (int i = 0; i < 1e5; i++) {
    if (!tim[i].size()) continue;
    while (tim[i].size() > 1) {
      int sz = tim[i].size();
      if (tim[i][sz - 1].x == tim[i][sz - 2].x &&
          tim[i][sz - 1].y == tim[i][sz - 2].y)
        tim[i].pop_back();
      else
        break;
    }
    reverse(tim[i].begin(), tim[i].end());
    if (tim[i].size() == 1)
      event.push_back({tim[i][0].x, tim[i][0].y, (double)i, 0});
    else {
      for (int j = 2; j < (int)tim[i].size(); j++) {
        if (abs((tim[i][j] - tim[i][0]) * (tim[i][j] - tim[i][1])) > eps)
          return 0;
      }
      P cur = tim[i][0], lar = tim[i][1];
      if (abs(cur.y - lar.y) < eps) return 0;
      double u = lar.x + (lar.x - cur.x) * (h - lar.y) / (lar.y - cur.y);
      double v = lar.x - lar.y * (lar.x - cur.x) / (lar.y - cur.y);
      if (u < -eps || u > w + eps || v < -eps || v > w + eps) return 0;
      event.push_back({u, v, (double)i, 1});
    }
  }
  return 1;
}
bool solve(double v) {
  for (int i = 0; i < (int)event.size(); i++) {
    vector<double> rev = event[i];
    double s = (event[i][2] - cur.back()) * v;
    if (abs(rev.back()) > eps) {
      if (cur.size() == 3) {
        if (abs(rev[0] - cur[0]) > s || abs(rev[1] - cur[1]) > s)
          return 0;
        else
          cur = {rev[0], rev[1], rev[2]};
      } else {
        double u2 = rev[0], d2 = rev[1], l = cur[0], r = cur[1], x1 = cur[2],
               y1 = cur[3];
        if (max(l, max(u2 - s, ((d2 + s) * (y1 - h) + x1 * h) / y1)) >
            min(r, min(u2 + s, ((d2 - s) * (y1 - h) + x1 * h) / y1)))
          return 0;
        else
          cur = {u2, d2, rev[2]};
      }
    } else {
      if (cur.size() == 3) {
        double u1 = cur[0], d1 = cur[1], x2 = rev[0], y2 = rev[1];
        double l =
            max(max((double)0, u1 - s), max(((d1 + s) * (y2 - h) + x2 * h) / y2,
                                            (x2 * h + w * (y2 - h)) / y2));
        double r = min(min(w, u1 + s),
                       min(x2 * h / y2, ((d1 - s) * (y2 - h) + x2 * h) / y2));
        if (l > r)
          return 0;
        else
          cur = {l, r, x2, y2, rev[2]};
      } else {
        double l = cur[0], r = cur[1], x1 = cur[2], y1 = cur[3], x2 = rev[0],
               y2 = rev[1];
        double a = y2 * (y1 - h) / ((y2 - h) * y1),
               b = (y1 - h) * ((x1 * h) / (y1 - h) - (x2 * h) / (y2 - h)) / y1;
        double l0 = max(l - s, (l - b + s * (y1 - h) / y1) / a),
               r0 = min(r + s, (r - b - s * (y1 - h) / y1) / a);
        l0 = max(l0, max((double)0, (x2 * h - w * (h - y2)) / y2));
        r0 = min(r0, min(w, x2 * h / y2));
        if (y1 != y2) {
          double c = min((s - s * (y1 - h) / y1 - b) / (a - 1),
                         (-s + s * (y1 - h) / y1 - b) / (a - 1));
          double d = max((s - s * (y1 - h) / y1 - b) / (a - 1),
                         (-s + s * (y1 - h) / y1 - b) / (a - 1));
          l0 = max(l0, c);
          r0 = min(r0, d);
        }
        if (l0 > r0) return 0;
        cur = {l0, r0, x2, y2, rev[2]};
      }
    }
  }
  return 1;
}
int main() {
  cout.precision(15);
  scanf("%d", &n);
  scanf("%lf %lf %lf %lf", &w, &h, &b, &a);
  cur = {a, b, (double)0};
  for (int i = 0; i < n; i++) {
    scanf("%d", &t);
    scanf("%lf %lf", &x, &y);
    tim[t].push_back((P){x, y});
  }
  if (!check()) {
    printf("-1");
    return 0;
  }
  double lo = 0, hi = 1e4;
  while (abs(hi - lo) > 1e-6) {
    double mid = (hi + lo) / 2;
    bool ok = solve(mid);
    if (ok)
      hi = mid;
    else
      lo = mid;
    cur = {a, b, (double)0};
  }
  cout << hi;
  return 0;
}