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;
int t[100000], first[100000], second[100000];
int ccw(pair<double, double> a, pair<double, double> b,
        pair<double, double> c) {
  return (b.first - a.first) * (c.second - a.second) >
         (b.second - a.second) * (c.first - a.first);
}
bool comp(pair<double, double> a, pair<double, double> b) {
  if (abs(a.first - b.first) < 1e-9)
    return a.second < b.second;
  else
    return a.first < b.first;
}
bool comp2(pair<double, double> a, pair<double, double> b) {
  return (abs(a.first - b.first) < 1e-9) && (abs(a.second - b.second) < 1e-9);
}
vector<pair<double, double> > convexHull(vector<pair<double, double> >& vv) {
  int i;
  vector<pair<double, double> > hull;
  sort(vv.begin(), vv.end(), comp);
  vv.resize(unique(vv.begin(), vv.end(), comp2) - vv.begin());
  for (i = 0; i < vv.size(); i++) {
    while ((hull.size() >= 2) && ccw(hull[hull.size() - 2], hull.back(), vv[i]))
      hull.pop_back();
    hull.push_back(vv[i]);
  }
  int l = hull.size();
  for (i = vv.size() - 2; i >= 0; i--) {
    while ((hull.size() > l) && ccw(hull[hull.size() - 2], hull.back(), vv[i]))
      hull.pop_back();
    hull.push_back(vv[i]);
  }
  return hull;
}
int main() {
  int i;
  int n, w, h, a, b;
  scanf("%d %d %d %d %d", &n, &w, &h, &a, &b);
  for (i = 0; i < n; i++) scanf("%d %d %d", &t[i], &first[i], &second[i]);
  int j;
  double l = 0, r = 1001;
  while (abs(l - r) > 1e-9) {
    double m = (l + r) / 2;
    pair<double, double> p1, p2;
    p1 = p2 = make_pair(a, b);
    for (i = 0; i < n; i++) {
      int tt = (i == 0) ? t[i] : t[i] - t[i - 1];
      if (tt == 0) {
        double mm = (double)(second[i] - h) / second[i],
               bb = (double)h * first[i] / second[i];
        if ((abs(p1.first - p2.first) < 1e-9) &&
            (abs(p1.second - p2.second) < 1e-9)) {
          if (abs(mm * p1.first + bb - p1.second) > 1e-9) break;
        } else if (!((abs(mm * p1.first + bb - p1.second) < 1e-9) &&
                     (abs(mm * p2.first + bb - p2.second) < 1e-9))) {
          double mm2 = (p1.second - p2.second) / (p1.first - p2.first),
                 bb2 = p1.second - mm2 * p1.first;
          if (abs(mm - mm2) < 1e-9)
            break;
          else {
            double a2 = (bb2 - bb) / (mm - mm2);
            double b2 = mm * a2 + bb;
            if ((a2 < min(p1.first, p2.first) - 1e-9) ||
                (a2 > max(p1.first, p2.first) + 1e-9))
              break;
            else
              p1 = p2 = make_pair(a2, b2);
          }
        }
      } else {
        vector<pair<double, double> > vv;
        vv.push_back(make_pair(p1.first - m * tt, p1.second - m * tt));
        vv.push_back(make_pair(p1.first - m * tt, p1.second + m * tt));
        vv.push_back(make_pair(p1.first + m * tt, p1.second - m * tt));
        vv.push_back(make_pair(p1.first + m * tt, p1.second + m * tt));
        vv.push_back(make_pair(p2.first - m * tt, p2.second - m * tt));
        vv.push_back(make_pair(p2.first - m * tt, p2.second + m * tt));
        vv.push_back(make_pair(p2.first + m * tt, p2.second - m * tt));
        vv.push_back(make_pair(p2.first + m * tt, p2.second + m * tt));
        vv = convexHull(vv);
        double mm = (double)(second[i] - h) / second[i],
               bb = (double)h * first[i] / second[i];
        pair<double, double> q1, q2;
        q1 = q2 = make_pair(1e99, 1e99);
        for (j = 1; j < vv.size(); j++) {
          if (abs(vv[j - 1].first - vv[j].first) < 1e-9) {
            double b2 = mm * vv[j].first + bb;
            if ((b2 > min(vv[j - 1].second, vv[j].second) - 1e-9) &&
                (b2 < max(vv[j - 1].second, vv[j].second) + 1e-9)) {
              pair<double, double> q = make_pair(vv[j].first, b2);
              if (q1 == make_pair(1e99, 1e99))
                q1 = q;
              else if ((abs(q.first - q1.first) > 1e-9) ||
                       (abs(q.second - q1.second) > 1e-9))
                q2 = q;
            }
          } else {
            double mm2 = (vv[j - 1].second - vv[j].second) /
                         (vv[j - 1].first - vv[j].first),
                   bb2 = vv[j].second - mm2 * vv[j].first;
            if (abs(mm - mm2) > 1e-9) {
              double a2 = (bb2 - bb) / (mm - mm2);
              double b2 = mm * a2 + bb;
              if ((a2 > min(vv[j - 1].first, vv[j].first) - 1e-9) &&
                  (a2 < max(vv[j - 1].first, vv[j].first) + 1e-9)) {
                pair<double, double> q = make_pair(a2, b2);
                if (q1 == make_pair(1e99, 1e99))
                  q1 = q;
                else if ((abs(q.first - q1.first) > 1e-9) ||
                         (abs(q.second - q1.second) > 1e-9))
                  q2 = q;
              }
            }
          }
        }
        if (q2 == make_pair(1e99, 1e99)) {
          if ((q1.first > -1e-9) && (q1.first < w + 1e-9) &&
              (q1.second > -1e-9) && (q1.second < w + 1e-9))
            p1 = p2 = q1;
          else
            break;
        } else {
          vv.clear();
          vv.push_back(make_pair(0, 0)), vv.push_back(make_pair(w, 0)),
              vv.push_back(make_pair(w, w)), vv.push_back(make_pair(0, w)),
              vv.push_back(make_pair(0, 0));
          for (j = 1; j < vv.size(); j++) {
            if (abs(vv[j - 1].first - vv[j].first) < 1e-9) {
              double b2 = mm * vv[j].first + bb;
              if ((b2 > min(vv[j - 1].second, vv[j].second) - 1e-9) &&
                  (b2 < max(vv[j - 1].second, vv[j].second) + 1e-9)) {
                pair<double, double> q = make_pair(vv[j].first, b2);
                if (q1.first > q2.first) swap(q1, q2);
                if (j == 2) {
                  if (q.first < q2.first)
                    q2 = make_pair(q.first, mm * q.first + bb);
                } else {
                  if (q.first > q1.first)
                    q1 = make_pair(q.first, mm * q.first + bb);
                }
                if (q1.first > q2.first + 1e-9) break;
              }
            } else {
              double mm2 = (vv[j - 1].second - vv[j].second) /
                           (vv[j - 1].first - vv[j].first),
                     bb2 = vv[j].second - mm2 * vv[j].first;
              if (abs(mm - mm2) > 1e-9) {
                double a2 = (bb2 - bb) / (mm - mm2);
                double b2 = mm * a2 + bb;
                if ((a2 > min(vv[j - 1].first, vv[j].first) - 1e-9) &&
                    (a2 < max(vv[j - 1].first, vv[j].first) + 1e-9)) {
                  pair<double, double> q = make_pair(a2, b2);
                  if (q1.second > q2.second) swap(q1, q2);
                  if (j == 1) {
                    if (q.second > q1.second)
                      q1 = make_pair((q.second - bb) / mm, q.second);
                  } else {
                    if (q.second < q2.second)
                      q2 = make_pair((q.second - bb) / mm, q.second);
                  }
                  if (q1.second > q2.second + 1e-9) break;
                }
              }
            }
          }
          if (j < vv.size())
            break;
          else
            p1 = q1, p2 = q2;
        }
      }
    }
    if (i == n)
      r = m;
    else
      l = m;
  }
  if (l > 1000)
    printf("-1\n");
  else
    printf("%.10lf\n", l);
  return 0;
}