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 MAXN = 2e5 + 5;
const double eps = 1e-7;
const double pps = 1e-4;
const double INF = 1e99;
template <typename T>
void chkmax(T &x, T y) {
  x = max(x, y);
}
template <typename T>
void chkmin(T &x, T y) {
  x = min(x, y);
}
template <typename T>
void read(T &x) {
  x = 0;
  int f = 1;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -f;
  for (; isdigit(c); c = getchar()) x = x * 10 + c - '0';
  x *= f;
}
template <typename T>
void write(T x) {
  if (x < 0) x = -x, putchar('-');
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
}
template <typename T>
void writeln(T x) {
  write(x);
  puts("");
}
struct point {
  double x, y;
};
struct line {
  point a, b;
};
point operator+(point a, point b) { return (point){a.x + b.x, a.y + b.y}; }
point operator-(point a, point b) { return (point){a.x - b.x, a.y - b.y}; }
point operator*(point a, double b) { return (point){a.x * b, a.y * b}; }
double operator*(point a, point b) { return a.x * b.y - a.y * b.x; }
double moo(point a) { return sqrt(a.x * a.x + a.y * a.y); }
point unit(point a) { return a * (1.0 / moo(a)); }
double dist(point a, point b) { return moo(b - a); }
bool equal(double x, double y) { return fabs(x - y) <= eps; }
bool parallel(line x, line y) { return equal((x.b - x.a) * (y.b - y.a), 0); }
double PolarAngle(point a) { return atan2(a.y, a.x); }
point intersect(const line &x, const line &y) {
  double tmp = (y.a - x.a) * (y.b - x.a);
  double tnp = (y.b - x.b) * (y.a - x.b);
  return (x.a * tnp + x.b * tmp) * (1 / (tmp + tnp));
}
bool online(const line &x, const point &y) {
  return equal((y - x.a) * (y - x.b), 0);
}
bool operator<(point a, point b) {
  if (equal(a.x, b.x))
    return a.y < b.y;
  else
    return a.x < b.x;
}
bool operator>(point a, point b) {
  if (equal(a.x, b.x))
    return a.y > b.y;
  else
    return a.x > b.x;
}
int n;
double w, h, t[MAXN];
point s, pos[MAXN];
line a[MAXN];
void extend(line &ans, line a, point x, point y) {
  line tmp = (line){min(x, y), max(x, y)};
  if (parallel(tmp, a)) {
    if (online(a, x)) {
      chkmin(ans.a, x);
      chkmax(ans.b, x);
      chkmin(ans.a, y);
      chkmax(ans.b, y);
    }
    return;
  }
  point pos = intersect(a, tmp);
  if (pos < tmp.a || pos > tmp.b) return;
  chkmin(ans.a, pos);
  chkmax(ans.b, pos);
}
void shrinka(line &ans, line a, point x, point y) {
  line tmp = (line){min(x, y), max(x, y)};
  if (parallel(tmp, a)) return;
  point pos = intersect(a, tmp);
  if (pos < tmp.a || pos > tmp.b) return;
  chkmax(ans.a, pos);
}
void shrinkb(line &ans, line a, point x, point y) {
  line tmp = (line){min(x, y), max(x, y)};
  if (parallel(tmp, a)) return;
  point pos = intersect(a, tmp);
  if (pos < tmp.a || pos > tmp.b) return;
  chkmin(ans.b, pos);
}
bool valid(double speed) {
  line now = (line){s, s};
  for (int i = 1; i <= n; i++) {
    double delta = (t[i] - t[i - 1]) * speed;
    line ans = (line){(point){INF, INF}, (point){-INF, -INF}};
    point x[4] = {now.a, now.a, now.a, now.a};
    point y[4] = {now.b, now.b, now.b, now.b};
    x[0].x -= delta, x[0].y -= delta;
    x[1].x -= delta, x[1].y += delta;
    x[2].x += delta, x[2].y += delta;
    x[3].x += delta, x[3].y -= delta;
    y[0].x -= delta, y[0].y -= delta;
    y[1].x -= delta, y[1].y += delta;
    y[2].x += delta, y[2].y += delta;
    y[3].x += delta, y[3].y -= delta;
    extend(ans, a[i], x[0], x[1]);
    extend(ans, a[i], x[1], x[2]);
    extend(ans, a[i], x[2], x[3]);
    extend(ans, a[i], x[3], x[0]);
    extend(ans, a[i], y[0], y[1]);
    extend(ans, a[i], y[1], y[2]);
    extend(ans, a[i], y[2], y[3]);
    extend(ans, a[i], y[3], y[0]);
    extend(ans, a[i], x[0], y[0]);
    extend(ans, a[i], x[1], y[1]);
    extend(ans, a[i], x[2], y[2]);
    extend(ans, a[i], x[3], y[3]);
    shrinka(ans, a[i], (point){0, 0}, (point){0, w});
    if (a[i].a.y < a[i].b.y)
      shrinka(ans, a[i], (point){0, 0}, (point){w, 0});
    else
      shrinkb(ans, a[i], (point){0, 0}, (point){w, 0});
    if (a[i].a.y > a[i].b.y)
      shrinka(ans, a[i], (point){w, w}, (point){0, w});
    else
      shrinkb(ans, a[i], (point){w, w}, (point){0, w});
    shrinkb(ans, a[i], (point){w, w}, (point){w, 0});
    if (ans.b < ans.a) return false;
    now = ans;
  }
  return true;
}
double calc(double x, point mid) {
  double ans = mid.x;
  ans += (mid.x - x) / mid.y * (h - mid.y);
  return ans;
}
int main() {
  read(n), read(w), read(h);
  read(s.x), read(s.y);
  for (int i = 1; i <= n; i++) {
    read(t[i]), read(pos[i].x), read(pos[i].y);
    a[i].a = (point){0, calc(0, pos[i])};
    a[i].b = (point){w, calc(w, pos[i])};
    if (a[i].a > a[i].b) swap(a[i].a, a[i].b);
  }
  double l = 0, r = 2 * w;
  while (l + pps < r) {
    double mid = (l + r) / 2;
    if (valid(mid))
      r = mid;
    else
      l = mid;
  }
  double ans = (l + r) / 2;
  if (ans > w + eps)
    printf("-1\n");
  else
    printf("%.10lf\n", ans);
  return 0;
}