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;
double PI = acos(-1.0);
double DEG_to_RAD(double d) { return d * PI / 180.0; }
double RAD_to_DEG(double r) { return r * 180.0 / PI; }
inline int cmp(double a, double b) {
  return (a < b - 1e-6) ? -1 : ((a > b + 1e-6) ? 1 : 0);
}
struct Point {
  double x, y;
  Point(double x = 0.0, double y = 0.0) : x(x), y(y) {}
  Point operator+(Point a) { return Point(x + a.x, y + a.y); }
  Point operator-(Point a) { return Point(x - a.x, y - a.y); }
  Point operator*(double k) { return Point(x * k, y * k); }
  Point operator/(double k) { return Point(x / k, y / k); }
  double operator*(Point a) { return x * a.x + y * a.y; }
  double operator%(Point a) { return x * a.y - y * a.x; }
  int cmp(Point q) const {
    if (int t = ::cmp(x, q.x)) return t;
    return ::cmp(y, q.y);
  }
  bool operator>(Point q) const { return cmp(q) > 0; }
  bool operator<(Point q) const { return cmp(q) < 0; }
  bool operator==(Point q) const { return cmp(q) == 0; }
  bool operator>=(Point q) const { return cmp(q) >= 0; }
  bool operator<=(Point q) const { return cmp(q) <= 0; }
  bool operator!=(Point q) const { return cmp(q) != 0; }
  Point conj() { return Point(x, -y); }
  double norm() { return x * x + y * y; }
  double len() { return sqrt(norm()); }
  Point rotate(double alpha) {
    double cosa = cos(alpha), sina = sin(alpha);
    return Point(x * cosa - y * sina, x * sina + y * cosa);
  }
  void print() { cout << x << ' ' << y << endl; }
};
int ccw(Point a, Point b, Point c) { return cmp((b - a) % (c - a), 0); }
struct Line {
  double a, b, c;
  Point A, B;
  Line(double a, double b, double c) : a(a), b(b), c(c) {}
  Line(Point A, Point B) : A(A), B(B) {
    a = B.y - A.y;
    b = A.x - B.x;
    c = -(a * A.x + b * A.y);
  }
  Line(Point P, double m) {
    a = -m;
    b = 1;
    c = -((a * P.x) + (b * P.y));
  }
  double f(Point A) { return a * A.x + b * A.y + c; }
};
bool areParallel(Line l1, Line l2) {
  return cmp(l1.a * l2.b, l1.b * l2.a) == 0;
}
bool areSame(Line l1, Line l2) {
  return areParallel(l1, l2) && cmp(l1.c * l2.a, l2.c * l1.a) == 0 &&
         cmp(l1.c * l2.b, l1.b * l2.c) == 0;
}
bool areIntersect(Line l1, Line l2, Point &p) {
  if (areParallel(l1, l2)) return false;
  double dx = l1.b * l2.c - l2.b * l1.c;
  double dy = l1.c * l2.a - l2.c * l1.a;
  double d = l1.a * l2.b - l2.a * l1.b;
  p = Point(dx / d, dy / d);
  return true;
}
Point lights[22];
double angle[22], l, r;
int n;
double f[1 << 20];
int main() {
  ios ::sync_with_stdio(false);
  cin.tie(NULL);
  cout << (fixed) << setprecision(9);
  while (cin >> n >> l >> r) {
    for (int i = 0, _a = (n); i < _a; i++) {
      cin >> lights[i].x >> lights[i].y >> angle[i];
      angle[i] = DEG_to_RAD(angle[i]);
    }
    for (int i = 0, _a = ((1 << (n))); i < _a; i++) f[i] = l;
    if (l == r) {
      cout << 0 << endl;
      continue;
    }
    Line ox(Point(l, 0), Point(r, 0));
    Point Q;
    for (int mask = 0, _a = ((1 << (n))); mask < _a; mask++) {
      for (int i = 0, _a = (n); i < _a; i++)
        if (!(mask & (1 << (i)))) {
          int newMask = mask + (1 << (i));
          Point P(f[mask], 0);
          P = (P - lights[i]).rotate(angle[i]) + lights[i];
          Line l(P, lights[i]);
          if (areIntersect(l, ox, Q)) {
            if (Q.x < f[mask]) Q.x = r + 1;
            f[newMask] = max(f[newMask], Q.x);
          } else {
            f[newMask] = r + 1;
          }
        }
    }
    double res = l;
    for (int mask = 0, _a = ((1 << (n))); mask < _a; mask++)
      res = max(res, f[mask]);
    res = min(res, r);
    cout << res - l << endl;
  }
  return 0;
}