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;
using ll = long long;
using ld = long double;
const int N = 20;
const ld EPS = 1e-10, PI = acos(-1), INF = 1e18;
inline bool eq(ld a, ld b) { return fabs(a - b) < EPS; }
inline bool lt(ld a, ld b) { return a + EPS < b; }
inline bool le(ld a, ld b) { return a < b + EPS; }
struct point {
  ld x, y;
  point(ld x = 0, ld y = 0) : x(x), y(y) {}
  point operator+(const point& p) const { return point(x + p.x, y + p.y); }
  point operator-(const point& p) const { return point(x - p.x, y - p.y); }
  point operator*(ld s) { return point(x * s, y * s); }
  point operator/(ld s) { return point(x / s, y / s); }
  ld operator*(const point& p) const { return x * p.x + y * p.y; }
  ld operator%(const point& p) const { return x * p.y - y * p.x; }
  point rotate(ld cs, ld sn) { return point(x * cs - y * sn, x * sn + y * cs); }
  point rotate(ld angle) { return rotate(cos(angle), sin(angle)); }
  bool operator==(const point& p) const { return eq(x, p.x) && eq(y, p.y); }
};
struct line {
  point a, ab;
  line(point ta, point tb) {
    a = ta;
    ab = tb - ta;
  }
  point b() { return a + ab; }
  bool onSegment(point p) {
    if (ab == point()) return a == p;
    point pa = a - p, pb = b() - p;
    return eq(pa % pb, 0) && le(pa * pb, 0);
  }
  bool areParallel(line l) { return eq(ab % l.ab, 0); }
};
bool areIntersect(line l1, line l2, point& res) {
  if (l1.areParallel(l2)) return 0;
  ld ls = (l2.a - l1.a) % l2.ab, rs = l1.ab % l2.ab;
  res = l1.a + l1.ab * ls / rs;
  return 1;
}
ld dp[(1 << N) + 10];
int n, l, r;
struct Lamp {
  point p;
  int a;
  Lamp(ld x = 0, ld y = 0, int a = 0) : a(a) { p = point(x, y); }
};
ld flood(ld cur, const Lamp& lamp) {
  point axis = lamp.p;
  point now = point(cur, 0);
  ld angle = ((ld)(lamp.a)) * PI / ((ld)(180));
  point curRotated = (now - axis).rotate(angle) + axis;
  point next;
  line res = line(axis, curRotated);
  line seg = line(point((ld)l, (ld)0), point((ld)r, (ld)0));
  if (areIntersect(res, seg, next)) {
    if (le(r, next.x) || le(next.x, cur))
      return -INF;
    else
      return next.x;
  }
  return -INF;
}
void solve() {
  cout << fixed << setprecision(10);
  cin >> n >> l >> r;
  vector<Lamp> la;
  for (int i = 0; i < n; i++) {
    int x, y, a;
    cin >> x >> y >> a;
    la.emplace_back((ld)x, (ld)y, a);
  }
  for (int i = 1; i < (1 << n); i++) {
    for (int k = 0; k < n; k++) {
      if (!(i & (1 << k))) continue;
      ld curRight = dp[i ^ (1 << k)];
      ld nextRight = flood(curRight + (ld)l, la[k]);
      if (nextRight == -INF) {
        cout << (ld)(r - l) << '\n';
        return;
      }
      dp[i] = max(dp[i], nextRight - (ld)l);
    }
  }
  cout << min((ld)(r - l), dp[(1 << n) - 1]) << '\n';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int TC = 1;
  for (int i = 1; i <= TC; i++) {
    solve();
  }
  return 0;
}