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;
const double eps = 1e-8;
struct inp {
  int l, r;
  bool operator<(const inp &t) const { return l < t.l; }
} a[2][505];
struct line {
  double x1, y1, x2, y2;
} q[1010];
int rq, wq;
int m, h, f, n[2], l, r;
double out;
double find(double x1) { return x1 * f / (double)(f - h); }
double area(double x1, double y1, double x2, double y2, double x3, double y3,
            double x4, double y4) {
  return (x1 * y2 + x2 * y3 + x3 * y4 + x4 * y1 - x2 * y1 - x3 * y2 - x4 * y3 -
          x1 * y4) /
         2;
}
void inter(int i, int j, double &x, double &y) {
  double mi = (q[i].y2 - q[i].y1) / (q[i].x2 - q[i].x1);
  double mj = (q[j].y2 - q[j].y1) / (q[j].x2 - q[j].x1);
  x = (q[i].y1 - q[j].y1 - mi * q[i].x1 + mj * q[j].x1) / (mj - mi);
  y = mi * (x - q[i].x1) + q[i].y1;
}
bool same(double x, double y) {
  double z = x - y;
  return (-eps < z) && (z < eps);
}
double fu(int I) {
  double x1, y1, x2, y2, x3, y3, x4, y4, ret = 0;
  x1 = q[1005].x1;
  y1 = -h;
  x2 = q[1007].x1;
  y2 = -h;
  for (int i = I; i < wq; i++) {
    if (q[i].x1 <= q[1005].x2) {
      inter(i, 1005, x3, y3);
      inter(i, 1007, x4, y4);
      if ((i & 1) == 0) ret += area(x1, y1, x2, y2, x4, y4, x3, y3);
      x1 = x3;
      y1 = y3;
      x2 = x4;
      y2 = y4;
    } else if (q[i].x1 < q[1007].x2) {
      if (same(y1, h)) {
        x3 = q[i].x1;
        y3 = q[i].y1;
        inter(1007, i, x4, y4);
        if ((i & 1) == 0) ret += area(x1, y1, x2, y2, x4, y4, x3, y3);
        x1 = x3;
        y1 = y3;
        x2 = x4;
        y2 = y4;
      } else {
        x3 = q[1005].x2;
        y3 = q[1005].y2;
        x4 = q[i].x1;
        y4 = q[i].y1;
        if ((i & 1) == 0) ret += area(x1, y1, x2, y2, x4, y4, x3, y3);
        x1 = x4;
        y1 = y4;
        inter(1007, i, x3, y3);
        inter(1007, i, x4, y4);
        if ((i & 1) == 0) ret += area(x1, y1, x2, y2, x4, y4, x3, y3);
        x2 = x4;
        y2 = y4;
      }
    } else {
      x3 = q[1005].x2;
      y3 = q[1005].y2;
      x4 = q[1007].x2;
      y4 = q[1007].y2;
      if ((i & 1) == 0) ret += area(x1, y1, x2, y2, x4, y4, x3, y3);
      break;
    }
  }
  return ret;
}
double fun() {
  double ret = 0;
  while (q[rq].x2 <= q[1005].x1) rq++;
  for (int i = rq; i < wq; i++) {
    if (q[1006].x1 <= q[i].x2) {
      q[1007] = q[1006];
      ret += fu(i);
      q[1005] = q[1007];
      break;
    } else {
      q[1007].x1 = q[i].x2;
      q[1007].y1 = -h;
      q[1007].x2 = find(q[i].x2);
      q[1007].y2 = 0;
      ret += fu(i);
      q[1005] = q[1007];
    }
  }
  return ret;
}
double solve(int z) {
  sort(a[z], a[z] + n[z]);
  double ret = 0;
  rq = wq = 0;
  for (int i = 0; i < n[z]; i++) {
    q[1005].x1 = a[z][i].l;
    q[1005].y1 = -h;
    q[1005].x2 = find(a[z][i].l);
    q[1005].y2 = 0;
    q[1006].x1 = a[z][i].r;
    q[1006].y1 = -h;
    q[1006].x2 = find(a[z][i].r);
    q[1006].y2 = 0;
    q[wq].x1 = q[1005].x2;
    q[wq].y1 = 0;
    q[wq].x2 = q[1005].x2 + q[1005].x2 - q[1005].x1;
    q[wq].y2 = -h;
    wq++;
    q[wq].x1 = q[1006].x2;
    q[wq].y1 = 0;
    q[wq].x2 = q[1006].x2 + q[1006].x2 - q[1006].x1;
    q[wq].y2 = -h;
    wq++;
    ret += area(q[wq - 2].x1, q[wq - 2].y1, q[wq - 2].x2, q[wq - 2].y2,
                q[wq - 1].x2, q[wq - 1].y2, q[wq - 1].x1, q[wq - 1].y1);
    ret += fun();
  }
  return ret;
}
int main() {
  scanf("%d%d%d\n", &m, &h, &f);
  n[0] = n[1] = 0;
  while (m--) {
    scanf("%d%d\n", &l, &r);
    if (l >= 0) {
      a[0][n[0]].l = l;
      a[0][n[0]].r = r;
      n[0]++;
    } else if (r <= 0) {
      a[1][n[1]].l = -r;
      a[1][n[1]].r = -l;
      n[1]++;
    } else {
      a[0][n[0]].l = 0;
      a[0][n[0]].r = r;
      n[0]++;
      a[1][n[1]].l = 0;
      a[1][n[1]].r = -l;
      n[1]++;
    }
  }
  out = solve(0) + solve(1);
  printf("%.5f\n", 2 * out);
  return 0;
}
