Problem: One day a bear lived on the Oxy axis. He was afraid of the dark, so he couldn't move at night along the plane points that aren't lit. One day the bear wanted to have a night walk from his house at point (l, 0) to his friend's house at point (r, 0), along the segment of length (r - l). Of course, if he wants to make this walk, he needs each point of the segment to be lit. That's why the bear called his friend (and yes, in the middle of the night) asking for a very delicate favor.

The Oxy axis contains n floodlights. Floodlight i is at point (xi, yi) and can light any angle of the plane as large as ai degree with vertex at point (xi, yi). The bear asked his friend to turn the floodlights so that he (the bear) could go as far away from his house as possible during the walking along the segment. His kind friend agreed to fulfill his request. And while he is at it, the bear wonders: what is the furthest he can go away from his house? Hep him and find this distance.

Consider that the plane has no obstacles and no other light sources besides the floodlights. The bear's friend cannot turn the floodlights during the bear's walk. Assume that after all the floodlights are turned in the correct direction, the bear goes for a walk and his friend goes to bed.

Input

The first line contains three space-separated integers n, l, r (1 ≤ n ≤ 20; - 105 ≤ l ≤ r ≤ 105). The i-th of the next n lines contain three space-separated integers xi, yi, ai ( - 1000 ≤ xi ≤ 1000; 1 ≤ yi ≤ 1000; 1 ≤ ai ≤ 90) — the floodlights' description. 

Note that two floodlights can be at the same point of the plane.

Output

Print a single real number — the answer to the problem. The answer will be considered correct if its relative or absolute error doesn't exceed 10 - 6.

Examples

Input

2 3 5
3 1 45
5 1 45


Output

2.000000000


Input

1 0 1
1 1 30


Output

0.732050808


Input

1 0 1
1 1 45


Output

1.000000000


Input

1 0 2
0 2 90


Output

2.000000000

Note

In the first sample, one of the possible solutions is: 

<image>

In the second sample, a single solution is: 

<image>

In the third sample, a single solution is: 

<image>

Solution (in JAVA):

Solution:
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.InputMismatchException;
import java.io.PrintStream;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Reader;
import java.io.Writer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Nipuna Samarasekara
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		FastScanner in = new FastScanner(inputStream);
		FastPrinter out = new FastPrinter(outputStream);
		TaskD solver = new TaskD();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskD {

    /////////////////////////////////////////////////////////////


   static double eps = Math.pow(10, -8);

    public void solve(int testNumber, FastScanner in, FastPrinter out) {
        int n = in.nextInt();
        int l = in.nextInt(), r = in.nextInt();
        Point[] points = new Point[n];
        double[] dp= new double[(1<<n)+10];

        for (int i = 0; i < dp.length; i++) {
            dp[i]=l;
        }
    //    dp[0]=l;
        for (int i = 0; i < n; i++) {
            points[i] = new Point(in.nextInt(), in.nextInt(), in.nextInt());
        }



//            if(iter%1000==0)
//            System.out.println(iter);
        for (int i = 1; i < (1<<n); i++) {
           int k=i;
            int pos=0;

            while(k>0){
                     if((k&1)==1){
                         int prev=i-(1<<pos);
                         double fin=dp[prev];
                 Point point = points[pos];

                 double alpha = Math.atan2(point.y, point.x - fin);

                 double theta = point.angle * Math.PI / 180.0;
                 if (alpha + theta + eps >= Math.PI) {
                     fin = r + 1;

                 }
                 else{
                 double d = Math.sqrt((point.x - fin)*(point.x - fin)+ point.y*point.y);
                 double add = d * Math.sin(theta) / Math.sin(Math.PI - theta - alpha);
                 //    System.out.println(add+" add");
                 fin += add;
                 }
               dp[i]=Math.max(dp[i],fin);
             }
            pos++;k>>=1;
            }
            dp[i]=Math.min(r,dp[i]);
        }
     //   System.out.println(dp[3]);
        out.println(dp[(1<<n)-1]-l);
    }
}

class Point implements Comparable<Point> {
    int x, y;
    double angle;

    Point(int x, int y, double angle) {
        this.x = x;
        this.y = y;
        this.angle = angle;
    }

    public int compareTo(Point o) {
        if (this.x < o.x) return -1;
        else if (this.x > o.x) return 1;
        else if (this.y > o.y) return 1;

        else if (this.y < o.y) return -1;
        else
            return 0;  //To change body of implemented methods use File | Settings | File Templates.
    }
}

class FastScanner extends BufferedReader {

    public FastScanner(InputStream is) {
        super(new InputStreamReader(is));
    }

    public int read() {
        try {
            int ret = super.read();
//            if (isEOF && ret < 0) {
//                throw new InputMismatchException();
//            }
//            isEOF = ret == -1;
            return ret;
        } catch (IOException e) {
            throw new InputMismatchException();
        }
    }

    static boolean isWhiteSpace(int c) {
        return c >= 0 && c <= 32;
    }

    public int nextInt() {
        int c = read();
        while (isWhiteSpace(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int ret = 0;
        while (c >= 0 && !isWhiteSpace(c)) {
            if (c < '0' || c > '9') {
                throw new NumberFormatException("digit expected " + (char) c
                        + " found");
            }
            ret = ret * 10 + c - '0';
            c = read();
        }
        return ret * sgn;
    }

    public String readLine() {
        try {
            return super.readLine();
        } catch (IOException e) {
            return null;
        }
    }

    }

class FastPrinter extends PrintWriter {

    public FastPrinter(OutputStream out) {
        super(out);
    }

    public FastPrinter(Writer out) {
        super(out);
    }


}