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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
double DEG_to_RAD(double d) { return d * acos(-1.0) / 180.0; }
double RAD_to_DEG(double r) { return r * 180.0 / acos(-1.0); }
struct point {
  double x, y;
  point() { x = y = 0.0; }
  point(double _x, double _y) : x(_x), y(_y) {}
  bool operator==(point other) const {
    return (fabs(x - other.x) < 1e-9 && (fabs(y - other.y) < 1e-9));
  }
  void print() { printf("%lf %lf\n", x, y); }
};
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 dist(point p1, point p2) { return hypot(p1.x - p2.x, p1.y - p2.y); }
double perimeter(const vector<point> &P) {
  double result = 0.0;
  for (int i = 0; i < (int)P.size() - 1; i++) result += dist(P[i], P[i + 1]);
  return result;
}
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) / 2.0;
}
double dot(vec a, vec b) { return (a.x * b.x + a.y * b.y); }
double norm_sq(vec v) { return v.x * v.x + v.y * v.y; }
double angle(point a, point o, point b) {
  vec oa = toVec(o, a), ob = toVec(o, b);
  return acos(dot(oa, ob) / sqrt(norm_sq(oa) * norm_sq(ob)));
}
double cross(vec a, vec b) { return a.x * b.y - a.y * b.x; }
bool ccw(point p, point q, point r) {
  return cross(toVec(p, q), toVec(p, r)) > 0;
}
bool collinear(point p, point q, point r) {
  return fabs(cross(toVec(p, q), toVec(p, r))) < 1e-9;
}
bool isConvex(const vector<point> &P) {
  int sz = (int)P.size();
  if (sz <= 3) return false;
  bool isLeft = ccw(P[0], P[1], P[2]);
  for (int i = 1; i < sz - 1; i++)
    if (ccw(P[i], P[i + 1], P[(i + 2) == sz ? 1 : i + 2]) != isLeft)
      return false;
  return true;
}
bool inPolygon(point pt, const vector<point> &P) {
  if ((int)P.size() == 0) return false;
  double sum = 0;
  for (int i = 0; i < (int)P.size() - 1; i++) {
    if (ccw(pt, P[i], P[i + 1]))
      sum += angle(P[i], pt, P[i + 1]);
    else
      sum -= angle(P[i], pt, P[i + 1]);
  }
  return fabs(fabs(sum) - 2 * acos(-1.0)) < 1e-9;
}
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;
}
point pivot;
bool angleCmp(point a, point b) {
  if (collinear(pivot, a, b)) return dist(pivot, a) < dist(pivot, b);
  double d1x = a.x - pivot.x, d1y = a.y - pivot.y;
  double d2x = b.x - pivot.x, d2y = b.y - pivot.y;
  return (atan2(d1y, d1x) - atan2(d2y, d2x)) < 0;
}
vector<point> CH(vector<point> P) {
  int i, j, n = (int)P.size();
  if (n <= 3) {
    if (!(P[0] == P[n - 1])) P.push_back(P[0]);
    return P;
  }
  int P0 = 0;
  for (i = 1; i < n; i++)
    if (P[i].y < P[P0].y || (P[i].y == P[P0].y && P[i].x > P[P0].x)) P0 = i;
  point temp = P[0];
  P[0] = P[P0];
  P[P0] = temp;
  pivot = P[0];
  sort(++P.begin(), P.end(), angleCmp);
  vector<point> S;
  S.push_back(P[n - 1]);
  S.push_back(P[0]);
  S.push_back(P[1]);
  i = 2;
  while (i < n) {
    j = (int)S.size() - 1;
    if (ccw(S[j - 1], S[j], P[i]))
      S.push_back(P[i++]);
    else
      S.pop_back();
  }
  return S;
}
struct line {
  double a, b, c;
};
bool areParallel(line l1, line l2) {
  return (fabs(l1.a - l2.a) < 1e-9) && (fabs(l1.b - l2.b) < 1e-9);
}
bool areSame(line l1, line l2) {
  return areParallel(l1, l2) && (fabs(l1.c - l2.c) < 1e-9);
}
bool areIntersect(line l1, line l2, point &p) {
  if (areParallel(l1, l2)) return false;
  p.x = (l2.b * l1.c - l1.b * l2.c) / (l2.a * l1.b - l1.a * l2.b);
  if (fabs(l1.b) > 1e-9)
    p.y = -(l1.a * p.x + l1.c);
  else
    p.y = -(l2.a * p.x + l2.c);
  return true;
}
void pointsToLine(point p1, point p2, line &l) {
  if (fabs(p1.x - p2.x) < 1e-9) {
    l.a = 1.0;
    l.b = 0.0;
    l.c = -p1.x;
  } else {
    l.a = -(double)(p1.y - p2.y) / (p1.x - p2.x);
    l.b = 1.0;
    l.c = -(double)(l.a * p1.x) - p1.y;
  }
}
point pointsLeftUp[600];
point pointsRightUp[600];
point pointsLeftDown[600];
point pointsRightDown[600];
point pointsLeft[600];
point pointsRight[600];
line linesLeft[600];
line linesRight[600];
vector<point> triangles[600];
int main() {
  int n, h, f, left, right;
  scanf("%d", &n);
  scanf("%d", &h);
  scanf("%d", &f);
  point focoUp, focoDown;
  focoUp = point(0, f);
  focoDown = point(0, -f);
  line mainLine;
  pointsToLine(point(0, h), point(1, h), mainLine);
  line aux;
  point pointAux;
  double sum = 0.0;
  vector<point> P0;
  vector<point> P1;
  vector<point> P2;
  for (int i = 0; i < n; i++) {
    scanf("%d", &left);
    scanf("%d", &right);
    pointsLeftUp[i] = point(left, h);
    pointsLeftDown[i] = point(left, -h);
    pointsRightUp[i] = point(right, h);
    pointsRightDown[i] = point(right, -h);
    pointsToLine(focoDown, pointsLeftDown[i], aux);
    linesLeft[i] = aux;
    pointsToLine(focoDown, pointsRightDown[i], aux);
    linesRight[i] = aux;
    areIntersect(mainLine, linesLeft[i], pointAux);
    pointsLeft[i] = pointAux;
    areIntersect(mainLine, linesRight[i], pointAux);
    pointsRight[i] = pointAux;
    triangles[i].push_back(focoDown);
    triangles[i].push_back(pointsLeft[i]);
    triangles[i].push_back(pointsRight[i]);
    triangles[i].push_back(focoDown);
    triangles[i] = cutPolygon(point(0, -h), point(1, -h), triangles[i]);
    sum += area(triangles[i]) * 2.0;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      P1 = cutPolygon(focoUp, pointsLeftUp[j], triangles[i]);
      P2 = cutPolygon(pointsRightUp[j], focoUp, P1);
      sum -= area(P2);
    }
  }
  printf("%lf\n", sum);
}