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;
vector<pair<int, int>> vec, vec1;
const double PI = acos(double(-1));
const double INF = 1e10;
const double EPS = 1e-8;
inline double sqr(double x) { return x * x; }
struct PT {
  double x, y;
  PT() {}
  PT(double x, double y) : x(x), y(y) {}
  void in() { scanf("%lf%lf", &x, &y); }
};
bool operator<(const PT &p1, const PT &p2) {
  if (fabs(p1.x - p2.x) > EPS) return p1.x < p2.x;
  return p1.y + EPS < p2.y;
}
bool operator==(const PT &p1, const PT &p2) {
  return fabs(p1.x - p2.x) < EPS && fabs(p1.y - p2.y) < EPS;
}
PT operator+(PT p1, PT p2) { return PT(p1.x + p2.x, p1.y + p2.y); }
PT operator-(PT p1, PT p2) { return PT(p1.x - p2.x, p1.y - p2.y); }
PT operator*(PT p, double c) { return PT(p.x * c, p.y * c); }
PT operator/(PT p, double c) { return PT(p.x / c, p.y / c); }
double dis(PT p) { return sqrt(sqr(p.x) + sqr(p.y)); }
double dis2(PT p) { return sqr(p.x) + sqr(p.y); }
double dis2(PT p1, PT p2) { return sqr(p1.x - p2.x) + sqr(p1.y - p2.y); }
double dis(PT p1, PT p2) { return sqrt(dis2(p1, p2)); }
double vect(PT p1, PT p2) { return p1.x * p2.y - p2.x * p1.y; }
double scal(PT p1, PT p2) { return p1.x * p2.x + p1.y * p2.y; }
double getAngle(PT p) { return atan2(p.y, p.x); }
double vect(PT p, PT p1, PT p2) { return vect(p1 - p, p2 - p); }
double scal(PT p, PT p1, PT p2) { return scal(p1 - p, p2 - p); }
double getAngle(PT p, PT p1, PT p2) {
  return getAngle(p2 - p) - getAngle(p1 - p);
}
double getAngle180(PT p, PT p1, PT p2) {
  return acos(scal(p, p1, p2) / dis(p, p1) / dis(p, p2));
}
double disToLine(PT p, PT p1, PT p2) {
  return fabs(vect(p, p1, p2)) / dis(p1, p2);
}
double disToSeg(PT p, PT p1, PT p2) {
  if (scal(p1, p, p2) < 0) return dis(p, p1);
  if (scal(p2, p, p1) < 0) return dis(p, p2);
  return disToLine(p, p1, p2);
}
bool onLine(PT p, PT p1, PT p2) { return fabs(vect(p1 - p, p2 - p)) < EPS; }
bool onSeg(PT p, PT p1, PT p2) {
  if (!onLine(p, p1, p2)) return 0;
  return (p1.x - p.x) * (p2.x - p.x) < EPS && (p1.y - p.y) * (p2.y - p.y) < EPS;
}
PT projection(PT a, PT b, PT p) {
  return a + (a - b) * (scal(p - a, a - b) / dis2(a - b));
}
int posLineLine(PT p1, PT p2, PT p3, PT p4, PT &p) {
  double s1 = vect(p1, p2, p3), s2 = vect(p1, p2, p4);
  if (fabs(s1 - s2) < EPS) {
    if (fabs(s1) < EPS) return 2;
    return 0;
  }
  p = p3 + (p4 - p3) * s1 / (s1 - s2);
  return 1;
}
int posCirLine(PT p, double r, PT p1, PT p2, PT *q) {
  double a, b, c, d2, d;
  a = dis2(p1, p2);
  b = scal(p1, p, p2);
  c = dis2(p, p1) - sqr(r);
  d2 = sqr(b) - a * c;
  if (d2 < -EPS) return 0;
  d = sqrt(fabs(d2));
  q[0] = p1 + (p2 - p1) * (b + d) / a;
  if (d2 < EPS) return 1;
  q[1] = p1 + (p2 - p1) * (b - d) / a;
  return 2;
}
int posCirCir(PT p1, double r1, PT p2, double r2, PT *q) {
  double dx, dy, d, e, f2, f;
  dx = p2.x - p1.x, dy = p2.y - p1.y;
  d = dis(p1, p2);
  e = (sqr(r1) - sqr(r2) + sqr(d)) / 2 / d;
  f2 = sqr(r1) - sqr(e);
  if (f2 < -EPS) return 0;
  f = sqrt(fabs(f2));
  q[0] = PT(p1.x + (e * dx - f * dy) / d, p1.y + (e * dy + f * dx) / d);
  if (f2 < EPS) return 1;
  q[1] = PT(p1.x + (e * dx + f * dy) / d, p1.y + (e * dy - f * dx) / d);
  return 2;
}
double calcArea(PT *p, int n) {
  double rlt = 0;
  for (int i = 0; i < n; i++) rlt += vect(p[i], p[(i + 1) % n]);
  return rlt / 2;
}
int inPolygon(PT p, PT *q, int m) {
  PT p1, p2;
  int k = 0;
  for (int i = 0; i < m; i++) {
    p1 = q[i], p2 = q[(i + 1) % m];
    if (onSeg(p, p1, p2)) return 2;
    if (p1.y > p2.y) swap(p1, p2);
    if (p1.y < p.y + EPS && p.y + EPS < p2.y && vect(p, p1, p2) > 0) k++;
  }
  return k % 2;
}
int convex_hull(PT *p, int n, PT *q) {
  sort(p, p + n);
  n = unique(p, p + n) - p;
  if (n == 1) {
    q[0] = p[0];
    return 1;
  }
  int m = 0;
  for (int i = 0; i < n; i++) {
    while (m > 1 && vect(q[m - 2], q[m - 1], p[i]) < EPS) m--;
    q[m++] = p[i];
  }
  int k = m;
  for (int i = n - 2; i >= 0; i--) {
    while (m > k && vect(q[m - 2], q[m - 1], p[i]) < EPS) m--;
    q[m++] = p[i];
  }
  return --m;
}
const int N = 1100;
PT R[N], S[N];
double inter(PT *p, int n, PT *q, int m) {
  int rn = 0;
  for (int i = 0; i < n; i++)
    if (inPolygon(p[i], q, m)) R[rn++] = p[i];
  for (int i = 0; i < m; i++)
    if (inPolygon(q[i], p, n)) R[rn++] = q[i];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      PT tmp;
      int ret = posLineLine(p[i], p[(i + 1) % n], q[j], q[(j + 1) % m], tmp);
      if (ret == 1 && onSeg(tmp, p[i], p[(i + 1) % n]) &&
          onSeg(tmp, q[j], q[(j + 1) % m])) {
        R[rn++] = tmp;
      }
    }
  }
  int sn = convex_hull(R, rn, S);
  return fabs(calcArea(S, sn));
}
int main() {
  int n, h, f;
  scanf("%d%d%d", &n, &h, &f);
  for (int i = 0; i < n; i++) {
    int l, r;
    scanf("%d%d", &l, &r);
    vec.emplace_back(l, r);
  }
  sort(vec.begin(), vec.end());
  int la = -1111111;
  for (int i = 0; i < vec.size(); ++i) {
    int l = vec[i].first, r = vec[i].second;
    if (l > la)
      vec1.emplace_back(l, r);
    else {
      auto t = vec1.back();
      vec1.pop_back();
      vec1.emplace_back(t.first, max(r, t.second));
    }
  }
  vec = vec1;
  double area = 0;
  for (auto &t : vec) {
    int l = t.first, r = t.second;
    PT p[4] = {PT(l, h), PT(r, h), PT(1.0 * r * (h + f) / (f - h), -h),
               PT(1.0 * l * (h + f) / (f - h), -h)};
    area += 2.0 * fabs(calcArea(p, 4));
    for (auto &s : vec) {
      int _l = s.first, _r = s.second;
      PT q[4] = {PT(_l, -h), PT(_r, -h), PT(1.0 * _r * (h + f) / (f - h), h),
                 PT(1.0 * _l * (h + f) / (f - h), h)};
      area -= inter(p, 4, q, 4);
    }
  }
  printf("%.10lf\n", area);
  return 0;
}
