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;
struct vec {
  double x, y;
  vec() {}
  vec(double a, double b) { x = a, y = b; }
  double mod() { return x * x + y * y; }
  void W() { printf("%lf %lf !\n", x, y); }
} a[1 << 20];
vec operator+(vec a, vec b) { return vec(a.x + b.x, a.y + b.y); }
vec operator-(vec a, vec b) { return vec(a.x - b.x, a.y - b.y); }
double operator*(vec a, vec b) { return a.x * b.x + a.y * b.y; }
double operator^(vec a, vec b) { return a.x * b.y - a.y * b.x; }
vec operator*(vec a, double b) { return vec(a.x * b, a.y * b); }
const double eps = 1e-9;
struct lin {
  vec p, v;
  lin() {}
  lin(vec a, vec b) { p = a, v = b; }
};
vec operator*(lin a, lin b) {
  double mu = ((b.p - a.p) ^ b.v) / (a.v ^ b.v);
  return a.p + a.v * mu;
}
int n, w, h, e1, e2;
int t[1 << 20];
bool IN(vec a, vec b, vec c) { return (c - a) * (c - b) < eps; }
bool INL(lin a, vec p) { return fabs(a.v ^ (p - a.p)) < eps; }
vec u[123];
bool bok[123];
bool test(vec a) {
  return a.x > -eps && a.y > -eps && w - a.x > -eps && w - a.y > -eps;
}
bool OK(double vv, int st, int ed, vec p1) {
  lin now(p1, vec(0, 0));
  for (int i = st; i <= ed; i++) {
    double A = -(h - a[i].y), B = -a[i].y, C = a[i].x * h;
    lin l;
    if (a[i].y) {
      l.p = vec(1, -(A + C) / B);
      l.v = vec(0, -C / B);
    } else {
      l.p = vec(-(B + C) / A, 1);
      l.v = vec(-C / A, 0);
    }
    l.v = l.v - l.p;
    if (t[i] == t[i - 1]) {
      if (fabs(now.v ^ l.v) < eps) return INL(l, now.p);
      return IN(now.p, now.p + now.v, now * l);
    }
    int tp = 4;
    double lim = vv * (t[i] - t[i - 1]);
    if (lim > w) lim = w;
    vec d1 = now.p, d2 = now.p + now.v;
    if (d1.x > d2.x) swap(d1, d2);
    if (fabs(d1.x - d2.x) < eps) {
      if (d1.y > d2.y) swap(d1, d2);
      u[1] = d1 + vec(-lim, -lim);
      u[2] = d1 + vec(lim, -lim);
      u[3] = d2 + vec(lim, lim);
      u[4] = d2 + vec(-lim, lim);
    } else if (fabs(d1.y - d2.y) < eps) {
      u[1] = d1 + vec(-lim, lim);
      u[2] = d1 + vec(-lim, -lim);
      u[3] = d2 + vec(lim, -lim);
      u[4] = d2 + vec(lim, lim);
    } else {
      tp = 6;
      if (d1.y < d2.y) {
        u[1] = d1 + vec(-lim, lim);
        u[2] = d1 + vec(-lim, -lim);
        u[3] = d1 + vec(lim, -lim);
        u[4] = d2 + vec(lim, -lim);
        u[5] = d2 + vec(lim, lim);
        u[6] = d2 + vec(-lim, lim);
      } else {
        u[1] = d1 + vec(lim, lim);
        u[2] = d1 + vec(-lim, lim);
        u[3] = d1 + vec(-lim, -lim);
        u[4] = d2 + vec(-lim, -lim);
        u[5] = d2 + vec(lim, -lim);
        u[6] = d2 + vec(lim, lim);
      }
    }
    u[tp + 1] = u[1];
    vec p1(2e19, 2e19), p2(2e19, 2e19);
    for (int j = 1; j <= tp + 1; j++) bok[j] = INL(l, u[j]);
    for (int j = 1; j <= tp; j++)
      if (bok[j] && bok[j + 1]) {
        p1 = u[j], p2 = u[j + 1];
        break;
      }
    if (p1.x > 1e19) {
      for (int j = 1; j <= tp; j++)
        if (bok[j]) {
          if (p1.x > 1e9)
            p1 = u[j];
          else
            p2 = u[j];
        }
    }
    if (p2.x > 1e19) {
      for (int j = 1; j <= tp; j++) {
        if (bok[j] || bok[j + 1] || fabs((u[j + 1] - u[j]) ^ l.v) < eps)
          continue;
        vec res = lin(u[j], u[j + 1] - u[j]) * l;
        if (IN(u[j], u[j + 1], res)) {
          if (p1.x > 1e19)
            p1 = res;
          else
            p2 = res;
        }
      }
    }
    if (p2.x > 1e19) p2 = p1;
    int fl = 0;
    if (fabs(p1.y - p2.y) < eps) fl = 1, swap(p1.x, p1.y), swap(p2.x, p2.y);
    if (fabs(p1.x - p2.x) < eps) {
      if (p1.x < -eps || p1.x - w > eps) return 0;
      if (p1.y > p2.y) swap(p1, p2);
      if (p2.y < -eps || p1.y - w > eps) return 0;
      p1.y = max(p1.y, 0.0);
      p2.y = min(p2.y, 1.0 * w);
    } else {
      if (p1.x > p2.x) swap(p1, p2);
      double kk = (p2.y - p1.y) / (p2.x - p1.x);
      double v1 = p1.x - p1.y / kk, v2 = p1.x + (w - p1.y) / kk;
      double sl = max(0.0, p1.x), sr = min(1.0 * w, p2.x);
      sl = max(sl, min(v1, v2)), sr = min(sr, max(v1, v2));
      if (sl - sr > eps) return 0;
      p1 = vec(sl, kk * (sl - p1.x) + p1.y);
      p2 = vec(sr, kk * (sr - p1.x) + p1.y);
    }
    if (fl) fl = 1, swap(p1.x, p1.y), swap(p2.x, p2.y);
    now = lin(p1, p2 - p1);
  }
  return 1;
}
double Get(int st, int ed) {
  vec p1;
  if (!st)
    p1 = vec(e1, e2);
  else {
    lin nw(a[st], a[st + 1] - a[st]);
    p1.x = (nw * lin(vec(0, 0), vec(1, 0))).x;
    p1.y = (nw * lin(vec(0, h), vec(1, 0))).x;
  }
  double l = 0, r = 2e3;
  while (r - l > 1e-6) {
    double mid = (l + r) / 2.0;
    if (OK(mid, st == 0 ? 1 : st + 2, ed, p1))
      r = mid;
    else
      l = mid;
  }
  return (l + r) / 2.0;
}
pair<pair<int, int>, int> cc[1 << 20];
int main() {
  scanf("%d%d%d%d%d", &n, &w, &h, &e1, &e2);
  for (int i = 1; i <= n; i++)
    scanf("%d%d%d", &cc[i].first.first, &cc[i].first.second, &cc[i].second);
  sort(cc + 1, cc + n + 1);
  n = unique(cc + 1, cc + n + 1) - cc - 1;
  for (int i = 1; i <= n; i++)
    t[i] = cc[i].first.first, a[i] = vec(cc[i].first.second, cc[i].second);
  double als = 0;
  int lst = 0;
  for (int i = 1, j; i <= n; i = j + 1) {
    for (j = i; t[j + 1] == t[i]; j++)
      ;
    if (j - i >= 1) {
      if (a[i].y == a[i + 1].y) return 0 & puts("-1");
      for (int k = i + 2; k <= j; k++)
        if (fabs((a[j] - a[i]) ^ (a[j] - a[i + 1])) > eps)
          return 0 & puts("-1");
      als = max(als, Get(lst, i + 1));
      lst = j - 1;
    }
  }
  als = max(als, Get(lst, n));
  if (als > 1500)
    puts("-1");
  else
    printf("%.6lf\n", als);
  return 0;
}