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.
#include <bits/stdc++.h>
using namespace std;
int n, h, f;
struct point {
  double x, y;
  point() { x = y = 0.0; }
  point(double _x, double _y) : x(_x), y(_y) {}
  bool operator<(point other) const {
    if (fabs(x - other.x) > 1e-9) return x < other.x;
    return y < other.y;
  }
  bool operator==(point other) const {
    return (fabs(x - other.x) < 1e-9 && (fabs(y - other.y) < 1e-9));
  }
};
struct vec {
  double x, y;
  vec(double _x, double _y) : x(_x), y(_y) {}
};
vec toVec(point a, point b) { return vec(b.x - a.x, b.y - a.y); }
double area(const vector<point> &P) {
  double result = 0.0, x1, y1, x2, y2;
  for (int i = 0; i < (int)P.size() - 1; i++) {
    x1 = P[i].x;
    x2 = P[i + 1].x;
    y1 = P[i].y;
    y2 = P[i + 1].y;
    result += (x1 * y2 - x2 * y1);
  }
  return fabs(result);
}
double cross(vec a, vec b) { return a.x * b.y - a.y * b.x; }
point lineIntLine(point P, point Q, point A, point B) {
  double A1 = Q.y - P.y;
  double B1 = P.x - Q.x;
  double C1 = A1 * P.x + B1 * P.y;
  double A2 = B.y - A.y;
  double B2 = A.x - B.x;
  double C2 = A2 * A.x + B2 * A.y;
  double det = A1 * B2 - A2 * B1;
  return point((B2 * C1 - B1 * C2) / det, (A1 * C2 - A2 * C1) / det);
}
point lineIntersectSeg(point p, point q, point A, point B) {
  double a = B.y - A.y;
  double b = A.x - B.x;
  double c = B.x * A.y - A.x * B.y;
  double u = fabs(a * p.x + b * p.y + c);
  double v = fabs(a * q.x + b * q.y + c);
  return point((p.x * v + q.x * u) / (u + v), (p.y * v + q.y * u) / (u + v));
}
vector<point> cutPolygon(point a, point b, const vector<point> &Q) {
  vector<point> P;
  for (int i = 0; i < (int)Q.size(); i++) {
    double left1 = cross(toVec(a, b), toVec(a, Q[i])), left2 = 0;
    if (i != (int)Q.size() - 1) left2 = cross(toVec(a, b), toVec(a, Q[i + 1]));
    if (left1 > -1e-9) P.push_back(Q[i]);
    if (left1 * left2 < -1e-9)
      P.push_back(lineIntersectSeg(Q[i], Q[i + 1], a, b));
  }
  if (!P.empty() && !(P.back() == P.front())) P.push_back(P.front());
  return P;
}
vector<point> build_polygon(int x1, int x2) {
  vector<point> points;
  point lu(x1, h), ru(x2, h), ld(x1, -h), rd(x2, -h);
  point paredU(0, h), paredU1(3, h), paredD(0, -h), paredD1(3, -h);
  point focoUp(0, f), focoDown(0, -f);
  points.push_back(lu);
  points.push_back(ru);
  points.push_back(lineIntLine(paredD, paredD1, ru, focoUp));
  points.push_back(lineIntLine(paredD, paredD1, lu, focoUp));
  points.push_back(lu);
  return points;
}
int main() {
  cin >> n >> h >> f;
  vector<point> ventanas(n);
  point paredU(0, h), paredU1(3, h), paredD(0, -h), paredD1(3, -h);
  for (int i = 0; i < n; i++) cin >> ventanas[i].x >> ventanas[i].y;
  vector<point> p_g;
  double areaTotal = 0;
  for (int i = 0; i < n; i++) {
    vector<point> normal =
        build_polygon((int)ventanas[i].x, (int)ventanas[i].y);
    areaTotal += area(normal);
    for (int j = 0; j < n; j++) {
      point abajoIzquierda(ventanas[j].y, -h);
      point focoAbajo(0, -f);
      point d = lineIntLine(focoAbajo, abajoIzquierda, paredU, paredU1);
      vector<point> t = cutPolygon(focoAbajo, d, normal);
      point abajoDerecha(ventanas[j].x, -h);
      vector<point> t1 =
          cutPolygon(lineIntLine(focoAbajo, abajoDerecha, paredU, paredU1),
                     abajoDerecha, t);
      areaTotal -= area(t1) * 0.5;
    }
  }
  cout << fixed << setprecision(6) << areaTotal << endl;
  return 0;
}
