#include <bits/stdc++.h>
using namespace std;
double dp[1 << 21], l, r, ans;
int n;
struct Light {
  double x, y;
  double alpha;
  Light(double _x = 0, double _y = 0, double _alpha = 0) {
    x = _x;
    y = _y;
    alpha = _alpha;
  }
} p[21];
double calc(int idx, double s) {
  double beta = p[idx].alpha - atan2(p[idx].x - s, p[idx].y);
  if (beta >= M_PI_2) return r;
  return p[idx].x + tan(beta) * p[idx].y;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> l >> r;
  for (__typeof(n - 1) i = (0); i <= (n - 1); i++) {
    cin >> p[i].x >> p[i].y >> p[i].alpha;
    p[i].alpha *= M_PI / 180.0;
  }
  for (__typeof((1 << n) - 1) mask = (0); mask <= ((1 << n) - 1); mask++) {
    dp[mask] = l;
    for (__typeof(n - 1) i = (0); i <= (n - 1); i++) {
      if (mask & (1 << i)) {
        int mask2 = mask - (1 << i);
        dp[mask] = max(dp[mask], calc(i, dp[mask2]));
      }
      ans = max(ans, dp[mask] - l);
    }
  }
  cout.precision(9);
  cout << fixed << min(ans, r - l) << endl;
  return 0;
}
