Problem: One day a bear lived on the Oxy axis. He was afraid of the dark, so he couldn't move at night along the plane points that aren't lit. One day the bear wanted to have a night walk from his house at point (l, 0) to his friend's house at point (r, 0), along the segment of length (r - l). Of course, if he wants to make this walk, he needs each point of the segment to be lit. That's why the bear called his friend (and yes, in the middle of the night) asking for a very delicate favor.

The Oxy axis contains n floodlights. Floodlight i is at point (xi, yi) and can light any angle of the plane as large as ai degree with vertex at point (xi, yi). The bear asked his friend to turn the floodlights so that he (the bear) could go as far away from his house as possible during the walking along the segment. His kind friend agreed to fulfill his request. And while he is at it, the bear wonders: what is the furthest he can go away from his house? Hep him and find this distance.

Consider that the plane has no obstacles and no other light sources besides the floodlights. The bear's friend cannot turn the floodlights during the bear's walk. Assume that after all the floodlights are turned in the correct direction, the bear goes for a walk and his friend goes to bed.

Input

The first line contains three space-separated integers n, l, r (1 ≤ n ≤ 20; - 105 ≤ l ≤ r ≤ 105). The i-th of the next n lines contain three space-separated integers xi, yi, ai ( - 1000 ≤ xi ≤ 1000; 1 ≤ yi ≤ 1000; 1 ≤ ai ≤ 90) — the floodlights' description. 

Note that two floodlights can be at the same point of the plane.

Output

Print a single real number — the answer to the problem. The answer will be considered correct if its relative or absolute error doesn't exceed 10 - 6.

Examples

Input

2 3 5
3 1 45
5 1 45


Output

2.000000000


Input

1 0 1
1 1 30


Output

0.732050808


Input

1 0 1
1 1 45


Output

1.000000000


Input

1 0 2
0 2 90


Output

2.000000000

Note

In the first sample, one of the possible solutions is: 

<image>

In the second sample, a single solution is: 

<image>

In the third sample, a single solution is: 

<image>

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const long long int INF = (long long int)1e9 + 10;
const long long int INFLL = (long long int)1e18 + 10;
const long double EPS = 1e-8;
const long double EPSLD = 1e-18;
const long long int MOD = 1e9 + 7;
template <class T>
T &chmin(T &a, const T &b) {
  return a = min(a, b);
}
template <class T>
T &chmax(T &a, const T &b) {
  return a = max(a, b);
}
const long double PI = atan(1) * 4.0;
struct L : public vector<complex<long double> > {
  L(const complex<long double> &a, const complex<long double> &b) {
    emplace_back(a);
    emplace_back(b);
  }
};
inline long double det(const complex<long double> &a,
                       const complex<long double> &b) {
  return imag(conj(a) * b);
}
inline long double dot(const complex<long double> &a,
                       const complex<long double> &b) {
  return real(conj(a) * b);
}
long double dtr(long double d) { return d * PI / 180.0; }
int ccw(complex<long double> a, complex<long double> b,
        complex<long double> c) {
  b -= a;
  c -= a;
  if (det(b, c) > EPSLD) return +1;
  if (det(b, c) < -EPSLD) return -1;
  if (dot(b, c) < -EPSLD) return +2;
  if (norm(b) < norm(c) - EPSLD) return -2;
  return 0;
}
bool intersectSP(const L &s, const complex<long double> &p) {
  return abs(s[0] - p) + abs(s[1] - p) - abs(s[1] - s[0]) < EPS;
}
complex<long double> projection(const L &l, const complex<long double> &p) {
  long double t = dot(p - l[0], l[1] - l[0]) / norm(l[1] - l[0]);
  return l[0] + t * (l[1] - l[0]);
}
long double distanceSP(const L &s, const complex<long double> &p) {
  const complex<long double> r = projection(s, p);
  if (intersectSP(s, r)) return abs(r - p);
  return min(abs(s[0] - p), abs(s[1] - p));
}
complex<long double> crosspoint(const L &l, const L &m) {
  long double a = det(l[1] - l[0], m[1] - m[0]);
  long double b = det(l[1] - l[0], l[1] - m[0]);
  if (abs(a) < EPSLD && abs(a) < EPSLD) return m[0];
  if (abs(a) < EPSLD) assert(false);
  return m[0] + b / a * (m[1] - m[0]);
}
complex<long double> rotate(complex<long double> p, long double t) {
  return p * exp(t * complex<long double>(0, 1));
}
vector<complex<long double> > rotate(vector<complex<long double> > pol,
                                     long double t) {
  for (auto &p : pol) p = rotate(p, t);
  return pol;
}
complex<long double> rotate(complex<long double> p, complex<long double> c,
                            long double t) {
  return rotate(p - c, t) + c;
}
vector<vector<complex<long double> > > convex_cut(
    const vector<complex<long double> > &pol, L l) {
  vector<vector<complex<long double> > > Q(2);
  for (long long int i = (0); i < (long long int)(pol.size()); i++) {
    complex<long double> a = pol[i], b = pol[(i + 1) % pol.size()];
    if (ccw(l[0], l[1], a) != -1) Q[0].emplace_back(a);
    if (ccw(l[0], l[1], a) != 1) Q[1].emplace_back(a);
    if (ccw(l[0], l[1], a) * ccw(l[0], l[1], b) < 0) {
      Q[0].emplace_back(crosspoint(L(a, b), l));
      Q[1].emplace_back(crosspoint(L(a, b), l));
    }
  }
  return Q;
}
long double area(const vector<complex<long double> > &pol) {
  long double a = 0;
  for (long long int i = (0); i < (long long int)(pol.size()); i++)
    a += det(pol[i], pol[(i + 1) % pol.size()]);
  return a / 2;
}
enum { OUT, ON, IN };
int contains(const vector<complex<long double> > pol,
             const complex<long double> p) {
  bool in = false;
  for (long long int i = (0);
       i < (long long int)(((long long int)(pol).size())); i++) {
    complex<long double> a = pol[i] - p, b = pol[(i + 1) % pol.size()] - p;
    if (imag(a) > imag(b)) swap(a, b);
    if (imag(a) < EPSLD && EPSLD < imag(b))
      if (det(a, b) < -EPSLD) in = !in;
    if (abs(det(a, b)) < EPSLD && dot(a, b) < EPSLD) return ON;
  }
  return in ? IN : OUT;
}
const long long int MAX_N = 72;
long long int n, l, r;
long long int x[MAX_N], y[MAX_N], a[MAX_N];
long double dp[(1LL << (20))];
int main() {
  scanf("%lld %lld %lld", &n, &l, &r);
  for (long long int i = (0); i < (long long int)(n); i++)
    scanf("%lld %lld %lld", &x[i], &y[i], &a[i]);
  for (long long int i = (0); i < (long long int)((1LL << (n))); i++)
    dp[i] = -INFLL;
  dp[0] = l;
  for (long long int mask = (0); mask < (long long int)((1LL << (n))); mask++) {
    for (long long int i = (0); i < (long long int)(n); i++)
      if (!(mask & (1LL << (i)))) {
        complex<long double> light = complex<long double>(x[i], y[i]);
        complex<long double> lp = complex<long double>(dp[mask], 0);
        complex<long double> v = rotate(lp - light, dtr(a[i]));
        if (v.imag() < -EPS) {
          long double res = y[i] / -v.imag() * v.real() + x[i];
          chmax(dp[mask | (1LL << (i))], min((long double)r, res));
        } else {
          chmax(dp[mask | (1LL << (i))], (long double)r);
        }
      }
  }
  printf("%.18lf\n", (double)(dp[(1LL << (n)) - 1] - l));
  return 0;
}