#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-12;
double dist[1 << 20];
int x[20], y[20], a[20];
int main() {
  int n, l, r;
  cin >> n >> l >> r;
  for (int i = 0; i < n; ++i) cin >> x[i] >> y[i] >> a[i];
  cout << fixed << setprecision(12);
  double ans = 0;
  for (int i = 0; i < (1 << n); ++i) {
    for (int j = 0; j < n; ++j) {
      if (!(i & (1 << j))) {
        int nxt = i | (1 << j);
        double le = l + dist[i];
        double used = abs(atan((double)abs(le - x[j]) / (double)y[j]));
        double angle = (double)a[j] / 180.0 * M_PI;
        double reach = 0;
        if (le < x[j]) {
          if (used > angle) {
            double total = used - angle;
            if (total > M_PI / 2 - eps) {
              cout << r - l << '\n';
              return 0;
            }
            reach = x[j] - abs(tan(total)) * (double)y[j] - l;
          } else {
            double total = angle - used;
            if (total > M_PI / 2 - eps) {
              cout << r - l << '\n';
              return 0;
            }
            reach = x[j] + abs(tan(total)) * (double)y[j] - l;
          }
        } else {
          double total = used + angle;
          if (total > M_PI / 2 - eps) {
            cout << r - l << '\n';
            return 0;
          }
          reach = x[j] + abs(tan(total)) * (double)y[j] - l;
        }
        dist[nxt] = max(dist[nxt], min(reach, (double)r - l));
        ans = max(ans, dist[nxt]);
      }
    }
  }
  cout << ans << '\n';
}
