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;
using DB = double;
const DB EPS = 1e-8;
const DB INF = 1e10;
struct PT {
  DB x, y;
  PT(DB x = 0, DB y = 0) : x(x), y(y) {}
  void in() {
    int _x, _y;
    cin >> _x >> _y;
    x = _x, y = _y;
  }
  bool operator<(const PT &p) const {
    if (fabs(p.x - x) < EPS) return y < p.y - EPS;
    return x < p.x;
  }
  bool operator==(const PT &p) const {
    return fabs(x - p.x) < EPS && fabs(y - p.y) < EPS;
  }
};
PT operator+(PT p1, PT p2) { return PT(p1.x + p2.x, p1.y + p2.y); }
PT operator-(PT p1, PT p2) { return PT(p1.x - p2.x, p1.y - p2.y); }
PT operator*(PT p, DB d) { return PT(p.x * d, p.y * d); }
PT operator/(PT p, DB d) { return PT(p.x / d, p.y / d); }
DB vect(PT p, PT p1, PT p2) {
  return (p1.x - p.x) * (p2.y - p.y) - (p1.y - p.y) * (p2.x - p.x);
}
const int N = 110000;
int n, e1, e2;
int w, h, t[N];
PT p[N];
PT dir[4] = {PT(-1, -1), PT(1, -1), PT(1, 1), PT(-1, 1)};
PT brd[4] = {PT(0, 0), PT(1, 0), PT(1, 1), PT(0, 1)};
PT inter(PT A, PT B, DB a, DB b, DB c) {
  DB val1 = A.x * a + A.y * b + c;
  DB val2 = B.x * a + B.y * b + c;
  if (val1 * val2 > EPS) return PT(INF, INF);
  if (fabs(val1) < EPS && fabs(val2) < EPS) return A;
  return (A * val2 - B * val1) / (val2 - val1);
}
vector<PT> convex(vector<PT> &ps) {
  if ((int)ps.size() <= 1) return ps;
  int n = ps.size(), k = 0;
  sort(ps.begin(), ps.end());
  vector<PT> ch(2 * n);
  for (int i = 0; i < n; ch[k++] = ps[i++])
    while (k >= 2 && vect(ch[k - 2], ch[k - 1], ps[i]) < EPS) --k;
  for (int i = n - 2, t = k + 1; i >= 0; ch[k++] = ps[i--])
    while (k >= t && vect(ch[k - 2], ch[k - 1], ps[i]) < EPS) --k;
  ch.resize(k - 1);
  return ch;
}
int main() {
  cin >> n >> w >> h >> e1 >> e2;
  for (int i = 0; i < n; i++) {
    cin >> t[i];
    p[i].in();
  }
  DB st = 0, en = 10;
  for (int times = 0; times < 35; times++) {
    PT A = PT(1. * e1 / w, 1. * e2 / w);
    PT B = A;
    DB md = (st + en) / 2;
    DB prv = 0;
    int flg = 0;
    for (int i = 0; i < n; i++) {
      DB d = t[i] - prv;
      prv = t[i];
      vector<PT> pts;
      for (int j = 0; j < 4; j++)
        pts.push_back(A + dir[j] * d * md), pts.push_back(B + dir[j] * d * md);
      pts = convex(pts);
      DB a = 1. - (DB)p[i].y / h, b = (DB)p[i].y / h, c = -1. * p[i].x / w;
      vector<PT> incs;
      for (int j = 0; j < pts.size(); j++) {
        PT L = pts[j], R = pts[(j + 1) % pts.size()];
        PT inc = inter(L, R, a, b, c);
        if (inc.x == INF) continue;
        incs.push_back(inc);
      }
      if (!incs.size()) {
        flg = 1;
        break;
      }
      sort(incs.begin(), incs.end());
      A = incs[0], B = incs.back();
      vector<PT> binc;
      for (int j = 0; j < 4; j++) {
        PT inc = inter(brd[j], brd[(j + 1) % 4], a, b, c);
        if (inc.x == INF) continue;
        binc.push_back(inc);
      }
      sort(binc.begin(), binc.end());
      if (A < binc[0]) A = binc[0];
      if (binc.back() < B) B = binc.back();
      if (B < A) {
        flg = 1;
        break;
      }
    }
    if (flg)
      st = md;
    else
      en = md;
  }
  if (st > 10 - EPS)
    puts("-1");
  else
    printf("%.10lf\n", st * w);
}