#include <bits/stdc++.h>
using namespace std;
int n, l, r, x[20], y[20], uses[1 << 20] = {};
double mem[1 << 20] = {}, a[20];
double bs(double f, int i) {
  double t, x2, y2, alf = M_PI - a[i];
  x2 = (x[i] - f) * cos(alf) + y[i] * sin(alf);
  y2 = -(x[i] - f) * sin(alf) + y[i] * cos(alf);
  if (y2 >= 0.0) return r;
  return min(-x2 * y[i] / y2 + x[i], 1.0 * r);
}
double calc(int mask) {
  if (mem[mask] < 0)
    for (int i = 0; i < n; ++i)
      if ((1 << i) & mask)
        mem[mask] = max(mem[mask], bs(calc(mask - (1 << i)), i));
  return mem[mask];
}
int main() {
  scanf("%d%d%d", &n, &l, &r);
  r -= l;
  for (int i = 0; i < n; ++i) {
    scanf("%d%d%lf", x + i, y + i, a + i);
    x[i] -= l;
    a[i] *= M_PI / 180;
  }
  vector<int> cur(1);
  for (int i = 0; i < n; ++i) {
    vector<int> tmp;
    for (vector<int>::iterator it = cur.begin(); it != cur.end(); ++it)
      for (int j = 0; j < n; ++j) {
        if (!uses[*it | (1 << j)]) {
          uses[*it | (1 << j)] = 1;
          tmp.push_back(*it | (1 << j));
        }
        if ((*it & (1 << j)) == 0)
          mem[*it | (1 << j)] = max(mem[*it | (1 << j)], bs(mem[*it], j));
      }
    swap(cur, tmp);
  }
  printf("%0.9lf\n", mem[(1 << n) - 1]);
  return 0;
}
