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;
struct point {
  double x, y;
  point() {}
  point(double a, double b) : x(a), y(b) {}
  void out() { cout << x << " " << y << endl; }
};
struct Line {
  point p1, p2;
  Line() {}
  Line(point a, point b) : p1(a), p2(b) {}
  bool operator<(const Line &b) const { return p1.x < b.p1.x; }
} line[600], line2[600];
struct Poly {
  point p[5];
} poly[600];
double xmult(point p1, point p2, point p0) {
  return (p1.x - p0.x) * (p2.y - p0.y) - (p2.x - p0.x) * (p1.y - p0.y);
}
double dmult(point p1, point p2, point p0) {
  return (p1.x - p0.x) * (p2.x - p0.x) + (p1.y - p0.y) * (p2.y - p0.y);
}
double distan(point p1, point p2) {
  return sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y));
}
int dots_inline(point p1, point p2, point p3) {
  return (((xmult(p1, p2, p3)) > 0 ? (xmult(p1, p2, p3))
                                   : -(xmult(p1, p2, p3))) < 1e-8);
}
int dot_online_in(point p, point l1, point l2) {
  return (((xmult(p, l1, l2)) > 0 ? (xmult(p, l1, l2)) : -(xmult(p, l1, l2))) <
          1e-8) &&
         (l1.x - p.x) * (l2.x - p.x) < 1e-8 &&
         (l1.y - p.y) * (l2.y - p.y) < 1e-8;
}
int dot_online_ex(point p, point l1, point l2) {
  return dot_online_in(p, l1, l2) &&
         (!(((p.x - l1.x) > 0 ? (p.x - l1.x) : -(p.x - l1.x)) < 1e-8) ||
          !(((p.y - l1.y) > 0 ? (p.y - l1.y) : -(p.y - l1.y)) < 1e-8)) &&
         (!(((p.x - l2.x) > 0 ? (p.x - l2.x) : -(p.x - l2.x)) < 1e-8) ||
          !(((p.y - l2.y) > 0 ? (p.y - l2.y) : -(p.y - l2.y)) < 1e-8));
}
int same_side(point p1, point p2, point l1, point l2) {
  return xmult(l1, p1, l2) * xmult(l1, p2, l2) > 1e-8;
}
int opposite_side(point p1, point p2, point l1, point l2) {
  return xmult(l1, p1, l2) * xmult(l1, p2, l2) < -1e-8;
}
int parallel(point u1, point u2, point v1, point v2) {
  return ((((u1.x - u2.x) * (v1.y - v2.y) - (v1.x - v2.x) * (u1.y - u2.y)) > 0
               ? ((u1.x - u2.x) * (v1.y - v2.y) - (v1.x - v2.x) * (u1.y - u2.y))
               : -((u1.x - u2.x) * (v1.y - v2.y) -
                   (v1.x - v2.x) * (u1.y - u2.y))) < 1e-8);
}
int perpendicular(point u1, point u2, point v1, point v2) {
  return ((((u1.x - u2.x) * (v1.x - v2.x) + (u1.y - u2.y) * (v1.y - v2.y)) > 0
               ? ((u1.x - u2.x) * (v1.x - v2.x) + (u1.y - u2.y) * (v1.y - v2.y))
               : -((u1.x - u2.x) * (v1.x - v2.x) +
                   (u1.y - u2.y) * (v1.y - v2.y))) < 1e-8);
}
int intersect(point u1, point u2, point v1, point v2) {
  if (opposite_side(u1, u2, v1, v2) && opposite_side(v1, v2, u1, u2)) return 1;
  if (!dots_inline(u1, u2, v1) || !dots_inline(u1, u2, v2))
    if (!same_side(u1, u2, v1, v2) && !same_side(v1, v2, u1, u2)) return 2;
  if (dot_online_in(u1, v1, v2) || dot_online_in(u2, v1, v2) ||
      dot_online_in(v1, u1, u2) || dot_online_in(v2, u1, u2))
    return 3;
  return 0;
}
point intersection(point u1, point u2, point v1, point v2) {
  point ret = u1;
  double t = ((u1.x - v1.x) * (v1.y - v2.y) - (u1.y - v1.y) * (v1.x - v2.x)) /
             ((u1.x - u2.x) * (v1.y - v2.y) - (u1.y - u2.y) * (v1.x - v2.x));
  ret.x += (u2.x - u1.x) * t;
  ret.y += (u2.y - u1.y) * t;
  return ret;
}
double cut(Line L1, Line L2, int pos) {
  point ret[20], tp[20];
  for (int i = 0; i <= 4; i++) {
    ret[i] = poly[pos].p[i];
  }
  int size = 4;
  int cnt = -1;
  for (int i = 0; i < size; i++) {
    if (xmult(ret[i], L1.p2, L1.p1) > -1e-8) {
      ++cnt;
      tp[cnt] = ret[i];
    }
    if (xmult(ret[i], L1.p2, L1.p1) * xmult(ret[i + 1], L1.p2, L1.p1) < -1e-8) {
      point rr = intersection(L1.p1, L1.p2, ret[i], ret[i + 1]);
      cnt++;
      tp[cnt] = rr;
    }
  }
  cnt++;
  tp[cnt] = tp[0];
  size = cnt;
  for (int i = 0; i <= cnt; i++) ret[i] = tp[i];
  cnt = -1;
  for (int i = 0; i < size; i++) {
    if (xmult(ret[i], L2.p2, L2.p1) < 1e-8) {
      ++cnt;
      tp[cnt] = ret[i];
    }
    if (xmult(ret[i], L2.p2, L2.p1) * xmult(ret[i + 1], L2.p2, L2.p1) < -1e-8) {
      point rr = intersection(L2.p1, L2.p2, ret[i], ret[i + 1]);
      cnt++;
      tp[cnt] = rr;
    }
  }
  cnt++;
  tp[cnt] = tp[0];
  double are = 0.0;
  for (int i = 0; i < cnt; i++) {
    are += (tp[i].x * tp[i + 1].y - tp[i].y * tp[i + 1].x);
  }
  return fabs(are) / 2.0;
}
int main() {
  int n;
  double h, f;
  double ans = 0.0;
  scanf("%d", &n);
  scanf("%lf %lf", &h, &f);
  for (int i = 1; i <= n; i++) {
    scanf("%lf %lf", &line[i].p1.x, &line[i].p2.x);
    line[i].p1.y = line[i].p2.y = h;
    line2[i].p1.x = f * line[i].p1.x / (f - h);
    line2[i].p2.x = f * line[i].p2.x / (f - h);
    line2[i].p1.y = line2[i].p2.y = 0;
    ans +=
        (line[i].p2.x - line[i].p1.x + line2[i].p2.x - line2[i].p1.x) * h / 2.0;
  }
  sort(line + 1, line + n + 1);
  sort(line2 + 1, line2 + n + 1);
  double inf = 1e50;
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    if (i == 1) {
      ++cnt;
      poly[cnt].p[0] = point(-inf, 0);
      poly[cnt].p[1] = line2[i].p1;
      poly[cnt].p[2] = line[i].p1;
      poly[cnt].p[3] = point(-inf, h);
      poly[cnt].p[4] = poly[cnt].p[0];
    } else {
      ++cnt;
      poly[cnt].p[0] = line2[i - 1].p2;
      poly[cnt].p[1] = line2[i].p1;
      poly[cnt].p[2] = line[i].p1;
      poly[cnt].p[3] = line[i - 1].p2;
      poly[cnt].p[4] = poly[cnt].p[0];
    }
  }
  ++cnt;
  poly[cnt].p[0] = line2[n].p2;
  poly[cnt].p[1] = point(inf, 0);
  poly[cnt].p[2] = point(inf, h);
  poly[cnt].p[3] = line[n].p2;
  poly[cnt].p[4] = poly[cnt].p[0];
  for (int i = 1; i <= n; i++) {
    Line left, right;
    left.p1 = point(line[i].p1.x, -h);
    left.p2 = point(line2[i].p1.x, 0);
    right.p1 = point(line[i].p2.x, -h);
    right.p2 = point(line2[i].p2.x, 0);
    for (int j = 1; j <= cnt; j++) {
      if (xmult(poly[j].p[0], right.p2, right.p1) > -1e-8 &&
          xmult(poly[j].p[3], right.p2, right.p1) > -1e-8) {
        continue;
      }
      if (xmult(left.p2, poly[j].p[1], left.p1) > -1e-8 &&
          xmult(left.p2, poly[j].p[2], left.p1) > -1e-8) {
        continue;
      }
      ans += cut(left, right, j);
    }
  }
  ans = ans * 2.0;
  printf("%.8lf\n", ans);
}
