Problem: Consider a house plan. 

Let the house be represented by an infinite horizontal strip defined by the inequality  - h ≤ y ≤ h. Strictly outside the house there are two light sources at the points (0, f) and (0, - f). Windows are located in the walls, the windows are represented by segments on the lines y = h and y = - h. Also, the windows are arranged symmetrically about the line y = 0.

Your task is to find the area of the floor at the home, which will be lighted by the sources of light. 

<image>

Input

The first line of the input file contains three integers n, h and f (1 ≤ n ≤ 500, 1 ≤ h ≤ 10, h < f ≤ 1000). Next, n lines contain two integers each li, ri ( - 5000 ≤ li < ri ≤ 5000), each entry indicates two segments. Endpoints of the first segment are (li, h)-(ri, h), and endpoints of the second segment are (li, - h)-(ri, - h). These segments describe location of windows. Numbers in the lines are space-separated. It is guaranteed that no two distinct segments have common points. 

Output

Print the single real number — the area of the illuminated part of the floor with an absolute or relative error of no more than 10 - 4.

Examples

Input

1 1 2
-1 1


Output

10.0000000000


Input

2 2 4
-1 0
1 2


Output

23.3333333333

Note

The second sample test is shown on the figure. Green area is the desired area of the illuminated part of the floor. Violet segments indicate windows.

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.*;
public class E82 {
	static double EPS = 1e-9;
public static void main(String[] args) throws IOException {
	input.init(System.in);
	PrintWriter out = new PrintWriter(System.out);
	int n = input.nextInt(), h = input.nextInt(), f = input.nextInt();
	double[] ls = new double[n], rs = new double[n];
	for(int i = 0; i<n; i++)
	{
		ls[i] = input.nextDouble();
		rs[i] = input.nextDouble();
	}
	Point[][] upper = new Point[n][4], lower = new Point[n][4];
	for(int i = 0; i<n; i++)
	{
		upper[i][0] = new Point(ls[i], h);
		upper[i][1] = new Point(ls[i] + 2*h*ls[i]/(f-h), -h);
		upper[i][2] = new Point(rs[i] + 2*h*rs[i]/(f-h), -h);
		upper[i][3] = new Point(rs[i], h);
		lower[i][0] = new Point(rs[i], -h);
		lower[i][1] = new Point(rs[i] + 2*h*rs[i]/(f-h), h);
		lower[i][2] = new Point(ls[i] + 2*h*ls[i]/(f-h), h);
		lower[i][3] = new Point(ls[i], -h);
	}
	//out.println(Arrays.toString(upper[0])+" "+Arrays.toString(lower[0]));
	double res = 0;
	for(Point[] p : upper) res += area(p);
	for(Point[] p : lower) res += area(p);
	for(Point[] p : upper)
		for(Point[] q : lower)
		{
			Point[] cur = clip(q[3], q[0], p);
			for(int i = 0; i<3; i++)
			{
				cur = clip(q[i], q[i+1], cur);
			}
			res -= area(cur);
		}
	out.println(res);
	out.close();
}
static Point llIntersect(Point a, Point b, Point c, Point d){
	Point e = d.minus(c), f = a.minus(c), g = b.minus(a);
	double AB = e.cross(f);
	double D = g.cross(e);
	if(Math.abs(D) < EPS)
		return null;
	return a.plus(g.mult(AB/D));
}
public static Point[] clip(Point A, Point B, Point[] p){
	ArrayDeque<Point> ret = new ArrayDeque<Point>();
	int n = p.length;
	Point C = B.minus(A);
	for(int i = 0; i < n; i++){
		Point a = p[i];
		Point b = p[(i+1)%n];
		
		Point hit = llIntersect(a, b, A, B);
			
		if(C.cross(a.minus(A)) > -EPS && C.cross(b.minus(A)) > -EPS){
			ret.add(b);
		}else if(C.cross(a.minus(A)) < -EPS && C.cross(b.minus(A)) > -EPS){
			ret.add(hit);
			ret.add(b);
		}else if(C.cross(a.minus(A)) > -EPS && C.cross(b.minus(A)) < -EPS){
			ret.add(hit);
		}
	}
	ArrayDeque<Point> compress = new ArrayDeque<Point>();
	for(Point q:ret)
		if(compress.size() == 0 || q.compareTo(compress.getLast()) != 0)
			compress.add(q);
	while(compress.size() > 0 && compress.getLast().compareTo(compress.getFirst()) == 0)
		compress.removeLast();
	
	return compress.toArray(new Point[0]);
}
static double area(Point[] poly)
{
	int n = poly.length;
	double res = 0;
	for(int i = 0; i<n; i++) res += poly[i].cross(poly[(i+1)%n]);
	return Math.abs(res/2);
}
static class Point implements Comparable<Point>
{
	double x, y;
	public Point(double xx, double yy)
	{
		x = xx; y = yy;
	}
	double cross(Point p)
	{
		return x*p.y - y*p.x;
	}
	Point minus(Point p)
	{
		return new Point(x-p.x, y-p.y);
	}
	Point mult(double a)
	{
		return new Point(x*a, y*a);
	}
	Point plus(Point p)
	{
		return new Point(x+p.x, y+p.y);
	}
	public int compareTo(Point o) {
		if(x != o.x) return Double.compare(x, o.x);
		return Double.compare(y, o.y);
	}
	public String toString()
	{
		return "("+x+", "+y+")";
	}
}
public static class input {
	static BufferedReader reader;
	static StringTokenizer tokenizer;

	static void init(InputStream input) {
		reader = new BufferedReader(new InputStreamReader(input));
		tokenizer = new StringTokenizer("");
	}

	static String next() throws IOException {
		while (!tokenizer.hasMoreTokens())
			tokenizer = new StringTokenizer(reader.readLine());
		return tokenizer.nextToken();
	}

	static int nextInt() throws IOException {
		return Integer.parseInt(next());
	}

	static double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}

	static long nextLong() throws IOException {
		return Long.parseLong(next());
	}
}
}