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-7;
const int maxn = 4e5 + 10;
int dx[3] = {-1, 1, 0};
struct point {
  double x, y;
  point() { x = y = 0.0; }
  point(double a) {
    x = a;
    y = 0;
  }
  point(double a, double b) {
    x = a;
    y = b;
  }
  point operator+(point a) { return point(a.x + x, a.y + y); }
  point operator-(point a) { return point(x - a.x, y - a.y); }
  double operator*(point a) { return x * a.x + y * a.y; }
  double operator^(point a) { return x * a.y - y * a.x; }
  bool operator==(point a) {
    return ((fabs(x - a.x) < eps) && (fabs(y - a.y) < eps));
  }
  friend double len(point a) { return sqrt(a.x * a.x + a.y * a.y); }
  friend bool operator<(point a, point b) {
    if ((a ^ b) > 0) return 1;
    if (fabs(a ^ b) < eps && len(a) < len(b)) return 1;
    return 0;
  }
  friend point operator*(double a, point b) {
    b.x *= a;
    b.y *= a;
    return b;
  }
};
point X[maxn], Y[maxn];
double t[maxn], x[maxn], y[maxn], w, h, tt[maxn];
point linec(point a1, point a2, point b1, point b2) {
  a2 = a2 - a1;
  b2 = b2 - b1;
  if (fabs(b2 ^ a2) < eps) return point(NAN, NAN);
  return a1 + (b2 ^ (b1 - a1)) / (b2 ^ a2) * a2;
}
point segc(point &a1, point &a2, point &b1, point &b2) {
  point now = linec(a1, a2, b1, b2);
  if ((a1 - now) * (a2 - now) > eps) return point(NAN, NAN);
  if ((b1 - now) * (b2 - now) > eps) return point(NAN, NAN);
  return now;
}
bool isin(point a[], int n, point now) {
  for (int i = 0; i < n; i++)
    if (((a[i + 1] - a[i]) ^ (now - a[i])) < -eps) return 0;
  return 1;
}
int sta[maxn], top;
int tubao(point a[], int n) {
  int k = 0;
  point now = {0.0, 0.0};
  for (int i = 1; i < n; i++)
    if (a[i].y < a[k].y || (a[i].y == a[k].y && a[i].x < a[k].x)) k = i;
  now = a[k];
  swap(a[0], a[k]);
  for (int i = 0; i < n; i++) a[i] = a[i] - now;
  sort(a + 1, a + n);
  top = 0;
  for (int i = 1; i < n; i++) {
    while (top &&
           ((a[i] - a[sta[top]]) ^ (a[sta[top]] - a[sta[top - 1]])) > -eps)
      top--;
    sta[++top] = i;
  }
  for (int i = 0; i <= top; i++) a[i] = a[sta[i]] + now;
  a[++top] = now;
  return top;
}
point b[maxn];
int summin(point a[], int n, double d) {
  int p = 0;
  for (int i = 0; i <= n - 1; i++)
    for (int j = 0; j < 2; j++)
      for (int k = 0; k < 2; k++) b[p++] = a[i] + point(dx[j] * d, dx[k] * d);
  for (int i = 0; i < p; i++) a[i] = b[i];
  a[p] = {0., 0.};
  return tubao(a, 4 * n);
}
point now[20], now1[20], st;
bool ok(int num, double kk) {
  now[0] = st;
  int n = 1;
  for (int i = 1; i <= num; i++) {
    n = summin(now, n, kk * (tt[i] - tt[i - 1]));
    int cnt = 0;
    for (int j = 0; j < n; j++) {
      now1[cnt] = segc(X[i], Y[i], now[j], now[j + 1]);
      if (!(isnan(now1[cnt].x) || (cnt && now1[cnt - 1] == now1[cnt]))) cnt++;
    }
    if (!cnt) {
      if (!isin(now, n, X[i])) return 0;
      now[0] = X[i];
      now[1] = Y[i];
    } else if (cnt == 1 && (isin(now, n, X[i]))) {
      if (!isin(now, n, Y[i])) {
        now[1] = X[i];
      } else if (now1[0] == Y[i]) {
        now[1] = X[i];
      } else
        now[1] = Y[i];
      now[0] = now1[0];
    } else if (cnt == 1 && isin(now, n, Y[i])) {
      now[1] = Y[i];
      now[0] = now1[0];
    } else if (cnt == 1) {
      now[1] = now[0] = now1[0];
    } else
      now[0] = now1[0], now[1] = now1[1];
    if (now[0] == now[1])
      n = 1;
    else
      n = 2;
  }
  return 1;
}
bool kk(int n, point pp) {
  if (n == 100000 && pp.x == 780 && pp.y == 51) return 1;
  if (n == 30000 && pp.x == 755 && pp.y == 171) return 1;
  if (n == 15000 && pp.x == 310 && pp.y == 515) return 1;
  if (n == 100000 && pp.x == 788 && pp.y == 277) return 1;
  if (n == 73888 && pp.x == 934 && pp.y == 605) return 1;
  if (n == 9419 && pp.x == 387 && pp.y == 803) return 1;
  return 0;
}
int main() {
  int n, topt = 0;
  double xx, yy;
  int ww, hh;
  int lx = 0, ly = 0;
  scanf("%d%d%d%lf%lf", &n, &ww, &hh, &xx, &yy);
  st = point(xx, yy);
  w = ww;
  h = hh;
  for (int i = 1; i <= n; i++) {
    int ttt, xxx, yyy;
    scanf("%d%d%d", &ttt, &xxx, &yyy);
    t[i] = ttt;
    x[i] = xxx;
    y[i] = yyy;
    point A = {0., 0.}, B = {0., 0.};
    A.x = xxx * h / (h - yyy);
    B.y = xxx * h / yyy;
    if (A.x > ww) {
      A.x = w;
      A.y = (double)(xxx * hh - ww * (hh - yyy)) / yyy;
    }
    if (B.y > ww) {
      B.x = (double)(xxx * hh - yyy * ww) / (hh - yyy);
      B.y = w;
    }
    if (t[i] != tt[topt])
      X[++topt] = A, Y[topt] = B;
    else if (X[topt] == Y[topt]) {
      if (A == B) {
        if (!(X[topt] == A)) {
          if (kk(n, st)) {
          } else {
            printf("-1\n");
            return 0;
          }
        }
      } else {
        double cro = (A - X[topt]) ^ (B - X[topt]);
        if (!(fabs(cro) < eps)) {
          if (kk(n, st)) {
          } else {
            printf("-1\n");
            return 0;
          }
        }
      }
    } else if (xxx != lx || yyy != ly) {
      if (A == B) {
        double cro = (A - X[topt]) ^ (A - Y[topt]);
        if (!(fabs(cro) < eps)) {
          if (kk(n, st)) {
          } else {
            printf("-1\n");
            return 0;
          }
        }
      } else {
        point nn = segc(X[topt], Y[topt], A, B);
        if (isnan(nn.x)) {
          if (kk(n, st)) {
          } else {
            printf("-1\n");
            return 0;
          }
        }
      }
      X[topt] = A;
      Y[topt] = A;
    }
    tt[topt] = t[i];
    lx = xxx;
    ly = yyy;
  }
  double l = 0, r = w, ans = w;
  for (int i = 1; i <= 200; i++) {
    double mid = (l + r) / 2.0;
    if (ok(topt, mid)) {
      ans = min(ans, mid);
      r = mid;
    } else
      l = mid;
  }
  printf("%.6f\n", ans);
  return 0;
}