#include <bits/stdc++.h>
using namespace std;
const int MAX = 20 + 2;
int X[MAX], Y[MAX], Z[MAX], N, L, R;
double D[1 << MAX];
struct vec2 {
  double x, y;
  vec2(double x, double y) : x(x), y(y) {}
  vec2 rotate(double angle) const {
    double nx = x * cos(angle) - y * sin(angle);
    double ny = x * sin(angle) + y * cos(angle);
    return vec2(nx, ny);
  }
  double length() const { return sqrt(x * x + y * y); };
  double angle(const vec2& that) const {
    return dot(that) / (length() * that.length());
  }
  double dot(const vec2& that) const { return x * that.x + y * that.y; }
  void normalize() {
    double len = length();
    x /= len;
    y /= len;
  }
};
static double f(double x, double y, double ang, double cur) {
  vec2 a(cur - x, -y);
  vec2 b(a.rotate(ang));
  if (fabs(b.y) < 1e-9 || b.y > 1e-9) return R;
  return x + b.x * (y / -b.y);
}
int main() {
  scanf("%d%d%d", &(N), &(L), &(R));
  for (int i = 0; i < (N); ++i) scanf("%d%d%d", &(X[i]), &(Y[i]), &(Z[i]));
  for (int i = 0; i < (1 << N); ++i) D[i] = L;
  for (int i = 0; i < (1 << N); ++i) {
    for (int j = 0; j < (N); ++j) {
      int nxt = 1 << j;
      if (!(i & nxt)) {
        D[i | nxt] = max(D[i | nxt], f(X[j], Y[j], Z[j] * M_PI / 180.0f, D[i]));
      }
    }
  }
  printf("%.9f", min<double>(R - L, D[(1 << N) - 1] - L));
  return 0;
}
