#include <bits/stdc++.h>
using namespace std;
struct P {
  double x, y, angle;
} p[25];
double l, r;
inline double calline(int ind, double d, double angle) {
  double x = d - p[ind].x, y = -p[ind].y;
  double nx = x * cos(angle) - y * sin(angle),
         ny = x * sin(angle) + y * cos(angle);
  x = p[ind].x;
  y = p[ind].y;
  if (fabs(ny) < 1e-9) return r;
  double deta = x * ny - nx * y;
  if (deta / ny < d) return r;
  return min(r, deta / (ny));
}
double dp[1 << 20];
int n;
int main(void) {
  while (cin >> n >> l >> r) {
    for (int i = 0; i < (n); i++) {
      cin >> p[i].x >> p[i].y >> p[i].angle;
      p[i].angle = p[i].angle / 180 * acos(-1.0);
    }
    int top = 1 << n;
    for (int i = 0; i < (top); i++) dp[i] = l;
    for (int i = 0; i < (top); i++) {
      for (int j = 0; j < (n); j++) {
        if (!(i & (1 << (j)))) {
          dp[i | (1 << (j))] =
              max(dp[i | (1 << (j))], calline(j, dp[i], p[j].angle));
        }
      }
    }
    printf("%.7lf\n", dp[top - 1] - l);
  }
  return 0;
}
