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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.OutputStream;
import java.util.Set;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.TreeSet;
import java.io.BufferedOutputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
import java.io.Writer;
import java.io.BufferedReader;
import java.util.Collections;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author An Almost Retired Guy
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskE solver = new TaskE();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskE {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.nextInt(), h = in.nextInt(), f = in.nextInt();
            int[] L = new int[n], R = new int[n];
            for (int i = 0; i < n; i++) {
                L[i] = in.nextInt();
                R[i] = in.nextInt();
            }
            Point F0 = new Point(0, -f), F1 = new Point(0, f);
            Line L0 = new Line(0, 1, h), L1 = new Line(0, 1, -h);
            Point[][][] polygons = new Point[2][n][];
            for (int i = 0; i < n; i++) {
                Line l0 = new Line(F0, new Point(L[i], -h)), l1 = new Line(F0, new Point(R[i], -h));
                polygons[0][i] = new Point[]{l1.intersect(L0), l1.intersect(L1), l0.intersect(L1), l0.intersect(L0)};
            }
            for (int i = 0; i < n; i++) {
                Line l0 = new Line(F1, new Point(L[i], h)), l1 = new Line(F1, new Point(R[i], h));
                polygons[1][i] = new Point[]{l0.intersect(L1), l0.intersect(L0), l1.intersect(L0), l1.intersect(L1)};
            }
            double ans = 0;
            for (Point[][] set : polygons)
                for (Point[] polygon : set) {
                    double area = GeometryUtils.area(polygon);
                    ans += area;
                }
            for (int i = 0; i < n; i++)
                for (int j = 0; j < n; j++) {
                    double area = PolygonsIntersection.overlap(polygons[0][i], polygons[1][j]);
                    ans -= area;
                }
            out.printf("%.10f\n", ans);
        }

    }

    static class GeometryUtils {
        public static final double EPS = 1e-10;

        public static int sign(double a) {
            return a < -EPS ? -1 : a > EPS ? 1 : 0;
        }

        public static double signedArea(Point[] points) {
            int n = points.length;
            double area = 0;
            for (int i = 0, j = n - 1; i < n; j = i++) {
                area += (points[i].x - points[j].x) * (points[i].y + points[j].y);
                // area += points[i].x * points[j].y - points[j].x * points[i].y;
            }
            return area / 2;
        }

        public static double area(Point[] points) {
            return Math.abs(signedArea(points));
        }

    }

    static class Line {
        public double a;
        public double b;
        public double c;

        public Line(double a, double b, double c) {
            this.a = a;
            this.b = b;
            this.c = c;
        }

        public Line(Point p1, Point p2) {
            a = +(p1.y - p2.y);
            b = -(p1.x - p2.x);
            c = p1.x * p2.y - p2.x * p1.y;
        }

        public Point intersect(Line line) {
            double d = a * line.b - line.a * b;
            if (GeometryUtils.sign(d) == 0) {
                return null;
            }
            double x = -(c * line.b - line.c * b) / d;
            double y = -(a * line.c - line.a * c) / d;
            return new Point(x, y);
        }

    }

    static class PolygonsIntersection {
        static final double eps = 1e-9;

        public static double overlap(Point[] polygon1, Point[] polygon2) {
            Point[][] polygons = {polygon1, polygon2};
            Set<Double> xs = new TreeSet<>();
            for (Point point : polygon1)
                xs.add(point.x);
            for (Point point : polygon2)
                xs.add(point.x);

            for (int i1 = 0, j1 = polygon1.length - 1; i1 < polygon1.length; j1 = i1++) {
                for (int i2 = 0, j2 = polygon2.length - 1; i2 < polygon2.length; j2 = i2++) {
                    Point intersection = getSegmentsIntersection(polygon1[i1], polygon1[j1], polygon2[i2], polygon2[j2]);
                    if (intersection != null) {
                        xs.add(intersection.x);
                    }
                }
            }

            Double[] xsa = xs.toArray(new Double[xs.size()]);
            double res = 0.0;
            for (int k = 0; k + 1 < xsa.length; k++) {
                double x = (xsa[k] + xsa[k + 1]) * 0.5;
                Point sweep0 = new Point(x, 0);
                Point sweep1 = new Point(x, 1);
                List<PolygonsIntersection.Event> events = new ArrayList<>();

                for (int p = 0; p < 2; p++) {
                    Point[] polygon = polygons[p];
                    double area = 0;
                    for (int i = 0, j = polygon.length - 1; i < polygon.length; j = i++)
                        area += (polygon[j].x - polygon[i].x) * (polygon[j].y + polygon[i].y);
                    for (int j = 0, i = polygon.length - 1; j < polygon.length; i = j++) {
                        Point intersection = getLinesIntersection(polygon[j], polygon[i], sweep0, sweep1);
                        if (intersection != null) {
                            double y = intersection.y;
                            double x0 = polygon[i].x;
                            double x1 = polygon[j].x;
                            if (x0 < x && x1 > x) {
                                events.add(new PolygonsIntersection.Event(y, (int) Math.signum(area) * (1 << p)));
                            } else if (x0 > x && x1 < x) {
                                events.add(new PolygonsIntersection.Event(y, -(int) Math.signum(area) * (1 << p)));
                            }
                        }
                    }
                }

                Collections.sort(events);

                double a = 0.0;
                int mask = 0;
                for (int j = 0; j < events.size(); j++) {
                    if (mask == 3)
                        a += events.get(j).y - events.get(j - 1).y;
                    mask += events.get(j).maskDelta;
                }

                res += a * (xsa[k + 1] - xsa[k]);
            }
            return res;
        }

        static Point getLinesIntersection(Point p1, Point p2, Point p3, Point p4) {
            double a1 = p2.y - p1.y;
            double b1 = p1.x - p2.x;
            double c1 = -(p1.x * p2.y - p2.x * p1.y);
            double a2 = p4.y - p3.y;
            double b2 = p3.x - p4.x;
            double c2 = -(p3.x * p4.y - p4.x * p3.y);
            double det = a1 * b2 - a2 * b1;
            if (Math.abs(det) < eps)
                return null;
            double x = -(c1 * b2 - c2 * b1) / det;
            double y = -(a1 * c2 - a2 * c1) / det;
            return new Point(x, y);
        }

        static Point getSegmentsIntersection(Point p1, Point p2, Point p3, Point p4) {
            if (!isCrossIntersect(p1, p2, p3, p4))
                return null;
            return getLinesIntersection(p1, p2, p3, p4);
        }

        static boolean isCrossIntersect(Point p1, Point p2, Point p3, Point p4) {
            double z1 = (p2.x - p1.x) * (p3.y - p1.y) - (p2.y - p1.y) * (p3.x - p1.x);
            double z2 = (p2.x - p1.x) * (p4.y - p1.y) - (p2.y - p1.y) * (p4.x - p1.x);
            double z3 = (p4.x - p3.x) * (p1.y - p3.y) - (p4.y - p3.y) * (p1.x - p3.x);
            double z4 = (p4.x - p3.x) * (p2.y - p3.y) - (p4.y - p3.y) * (p2.x - p3.x);
            return (z1 < -eps || z2 < -eps) && (z1 > eps || z2 > eps) && (z3 < -eps || z4 < -eps) && (z3 > eps || z4 > eps);
        }

        static class Event implements Comparable<PolygonsIntersection.Event> {
            public double y;
            public int maskDelta;

            public Event(double y, int maskDelta) {
                this.y = y;
                this.maskDelta = maskDelta;
            }


            public int compareTo(PolygonsIntersection.Event o) {
                if (y != o.y)
                    return Double.compare(y, o.y);
                return Integer.compare(maskDelta, o.maskDelta);
            }

        }

    }

    static class InputReader {
        BufferedReader br;
        StringTokenizer st;

        public InputReader(InputStream inputStream) {
            br = new BufferedReader(new InputStreamReader(inputStream));
        }

        public String next() {
            while (st == null || !st.hasMoreElements()) {
                st = new StringTokenizer(nextLine());
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public String nextLine() {
            try {
                return br.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }

    }

    static class Point implements Comparable<Point> {
        public double x;
        public double y;

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

        public Point(Vector2d vector) {
            this(vector.x, vector.y);
        }


        public int compareTo(Point that) {
            if (Math.abs(this.x - that.x) > GeometryUtils.EPS) return this.x < that.x ? -1 : 1;
            if (Math.abs(this.y - that.y) > GeometryUtils.EPS) return this.y < that.y ? -1 : 1;
            return 0;
        }


        public boolean equals(Object obj) {
            Point that = (Point) obj;
            return Math.abs(this.x - that.x) < GeometryUtils.EPS && Math.abs(this.y - that.y) < GeometryUtils.EPS;
        }

    }

    static class Vector2d {
        public double x;
        public double y;

        public Vector2d(double x, double y) {
            this.x = x;
            this.y = y;
        }

        public Vector2d(Point A, Point B) {
            this(B.x - A.x, B.y - A.y);
        }


        public String toString() {
            return "Vector2d [x=" + x + ", y=" + y + "]";
        }

    }

    static class OutputWriter extends PrintWriter {
        public OutputWriter(OutputStream outputStream) {
            super(new BufferedOutputStream(outputStream));
        }

        public OutputWriter(Writer writer) {
            super(writer);
        }

        public void close() {
            super.close();
        }

    }
}