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>
inline int in() {
  int k = 0;
  char ch = getchar();
  while (ch < '-') ch = getchar();
  while (ch > '-') k = k * 10 + ch - '0', ch = getchar();
  return k;
}
const double eps = 1e-8, inf = 1e18;
const int N = 2e5 + 5;
double w, h, sx, sy, t[N], x[N], y[N];
int n;
inline int dcmp(const double &x) {
  return fabs(x) < eps ? 0 : (x > 0 ? 1 : -1);
}
struct node {
  double x, y;
  node(double x = 0, double y = 0) : x(x), y(y) {}
  inline node operator+(const node &b) const { return node(x + b.x, y + b.y); }
  inline node operator-(const node &b) const { return node(x - b.x, y - b.y); }
  inline double operator*(const node &b) const { return x * b.y - y * b.x; }
  inline node operator*(const double &b) const { return node(x * b, y * b); }
  inline bool operator==(const node &b) const {
    return !dcmp(x - b.x) && !dcmp(y - b.y);
  }
  inline bool operator<(const node &b) const {
    return dcmp(x - b.x) == -1 || (dcmp(x - b.x) == 0 && dcmp(y - b.y) == -1);
  }
} tmp, s;
struct Line {
  node a, b;
  Line() {}
  Line(node a, node b) : a(a), b(b) {}
  inline void out() { printf("(%lf,%lf) (%lf,%lf)\n", a.x, a.y, b.x, b.y); }
} a[N];
template <typename T>
void cmin(T &x, T y) {
  if (y < x) x = y;
}
template <typename T>
void cmax(T &x, T y) {
  if (x < y) x = y;
}
node Line_jd(Line x, Line y) {
  double t1 = (y.a - x.a) * (y.b - x.a), t2 = (y.b - x.b) * (y.a - x.b);
  return (x.a * t2 + x.b * t1) * (1 / (t1 + t2));
}
inline bool px(Line a, Line b) { return dcmp((a.b - a.a) * (b.b - b.a)) == 0; }
bool in_line(const Line &x, const node &y) {
  return dcmp((y - x.a) * (y - x.b)) == 0;
}
inline void upd(Line &ans, Line a, node x, node y) {
  Line tmp = (x < y) ? (Line(x, y)) : (Line(y, x));
  if (px(tmp, a)) {
    if (in_line(a, x))
      cmin(ans.a, x), cmax(ans.b, x), cmin(ans.a, y), cmax(ans.b, y);
    return;
  }
  node pos = Line_jd(a, tmp);
  if (pos < tmp.a || tmp.b < pos) return;
  cmin(ans.a, pos);
  cmax(ans.b, pos);
}
inline void updatea(Line &ans, Line a, node x, node y) {
  Line tmp = (x < y) ? (Line(x, y)) : (Line(y, x));
  if (px(tmp, a)) return;
  node pos = Line_jd(a, tmp);
  if (pos < tmp.a || tmp.b < pos) return;
  cmax(ans.a, pos);
}
inline void updateb(Line &ans, Line a, node x, node y) {
  Line tmp = (x < y) ? (Line(x, y)) : (Line(y, x));
  if (px(tmp, a)) return;
  node pos = Line_jd(a, tmp);
  if (pos < tmp.a || tmp.b < pos) return;
  cmin(ans.b, pos);
}
inline bool check(double len) {
  Line now = Line(s, s);
  for (int i = 1; i <= n; ++i) {
    double del = (t[i] - t[i - 1]) * len;
    Line ans = Line(node(inf, inf), node(-inf, -inf));
    node x[4] = {now.a, now.a, now.a, now.a};
    node y[4] = {now.b, now.b, now.b, now.b};
    node dup = node(0, -del), ddn = node(0, del);
    node dle = node(-del, 0), dri = node(del, 0);
    x[0] = x[0] + dle + dup;
    x[1] = x[1] + dle + ddn;
    x[2] = x[2] + dri + ddn;
    x[3] = x[3] + dri + dup;
    y[0] = y[0] + dle + dup;
    y[1] = y[1] + dle + ddn;
    y[2] = y[2] + dri + ddn;
    y[3] = y[3] + dri + dup;
    for (int j = 0; j < 3; ++j) upd(ans, a[i], x[j], x[j + 1]);
    upd(ans, a[i], x[3], x[0]);
    for (int j = 0; j < 3; ++j) upd(ans, a[i], y[j], y[j + 1]);
    upd(ans, a[i], y[3], y[0]);
    for (int j = 0; j < 4; ++j) upd(ans, a[i], x[j], y[j]);
    updatea(ans, a[i], node(0, 0), node(0, w));
    if (a[i].a.y < a[i].b.y)
      updatea(ans, a[i], node(0, 0), node(w, 0));
    else
      updateb(ans, a[i], node(0, 0), node(w, 0));
    if (a[i].a.y > a[i].b.y)
      updatea(ans, a[i], node(w, w), node(0, w));
    else
      updateb(ans, a[i], node(w, w), node(0, w));
    updateb(ans, a[i], node(w, w), node(w, 0));
    if (ans.b < ans.a) return 0;
    now = ans;
  }
  return 1;
}
inline double Calc(double x, node a) {
  return a.x + (a.x - x) / a.y * (h - a.y);
}
int main() {
  n = in(), w = in(), h = in();
  s.x = in(), s.y = in();
  for (int i = 1; i <= n; ++i) {
    t[i] = in(), tmp.x = in(), tmp.y = in();
    a[i].a = node(0, Calc(0, tmp));
    a[i].b = node(w, Calc(w, tmp));
    if (a[i].b < a[i].a) std::swap(a[i].a, a[i].b);
  }
  double l = 0, r = w * 2;
  while (r - l > eps) {
    double mid = (l + r) / 2;
    check(mid) ? r = mid : l = mid;
  }
  double ans = (l + r) / 2;
  if (ans > w + eps)
    puts("-1");
  else
    printf("%.10lf\n", ans);
  return 0;
}