#include <bits/stdc++.h>
using namespace std;
struct node {
  double x, y, a;
} p[25];
double Sin[25], Cos[25];
const double PI = acos(-1.0);
double dp[1 << 20];
int pw[1 << 20];
int sgn(double x) {
  if (fabs(x) < 1e-10) return 0;
  if (x > 0)
    return 1;
  else
    return -1;
}
double f(double x, int i) {
  double X = x - p[i].x, Y = -p[i].y;
  double nx = X * Cos[i] - Y * Sin[i];
  double ny = X * Sin[i] + Y * Cos[i];
  if (sgn(ny) >= 0) return 1e15;
  return p[i].x - p[i].y / ny * nx;
}
int main() {
  int n;
  double l, r;
  scanf("%d%lf%lf", &n, &l, &r);
  for (int i = 0; i < n; i++)
    scanf("%lf%lf%lf", &p[i].x, &p[i].y, &p[i].a),
        Sin[i] = sin(p[i].a / 180 * PI), Cos[i] = cos(p[i].a / 180 * PI);
  for (int i = 0; i < n; i++) pw[1 << i] = i;
  for (int i = 0; i < 1 << n; i++) dp[i] = -1e15;
  dp[0] = l;
  for (int i = 1; i < 1 << n; i++) {
    for (int st = i; st; st -= st & -st) {
      dp[i] = max(dp[i], f(dp[i ^ (st & -st)], pw[st & -st]));
    }
  }
  printf("%.9f\n", min(dp[(1 << n) - 1], r) - l);
  return 0;
}
