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 tp {
  double x, y;
} A, B, C, D, E, F, p, q, G, st[10005], en[10005];
struct seg {
  double L, R;
} Q[10005];
struct Link {
  double ul, ur, dl, dr;
} a[10005];
double ans = 0, rp, lp, S1, S2, L, R;
int n, c, f, h, _c, m = 0;
int t1 = 0, t2 = 0;
bool cmq(const seg a, const seg b) { return a.L + 1e-7 < b.L; }
double det(tp A, tp B) { return A.x * B.y - B.x * A.y; }
bool cmp(tp A, tp B) { return abs(A.x - B.x) < 1e-7 && abs(A.y - B.y) < 1e-7; }
double Det(double X1, double Y1, double X2, double Y2) {
  return X1 * Y2 - X2 * Y1;
}
void getpoint(tp A, tp B, tp C, tp D) {
  S1 = Det(C.x - A.x, C.y - A.y, B.x - A.x, B.y - A.y);
  S2 = Det(B.x - A.x, B.y - A.y, D.x - A.x, D.y - A.y);
  if (abs(S1 + S2) < 1e-7) return;
  G.x = (C.x * S2 + D.x * S1) / (S1 + S2);
  G.y = (C.y * S2 + D.y * S1) / (S1 + S2);
}
void calc(int t, tp A, tp B) {
  t1 -= clock();
  if (t > n && abs(A.x) < 1e-7 && abs(B.x) < 1e-7) return;
  p = A, q = B;
  c = 0;
  if (p.y < q.y) swap(p, q);
  for (int i = 1; i <= n + n; ++i)
    if (i != t) {
      C.x = a[i].ul, C.y = h;
      D.x = a[i].dl, D.y = -h;
      E.x = a[i].ur, E.y = h;
      F.x = a[i].dr, F.y = -h;
      if (E.x < p.x + 1e-7 && F.x < q.x + 1e-7 ||
          p.x < C.x + 1e-7 && q.x < D.x + 1e-7)
        continue;
      if (C.x < p.x + 1e-7 && D.x < q.x + 1e-7) {
        if (E.x + 1e-7 < p.x)
          rp = -h;
        else
          rp = h;
      } else {
        getpoint(C, D, p, q);
        rp = G.y;
      }
      if (p.x < E.x + 1e-7 && q.x < F.x + 1e-7) {
        if (C.x + 1e-7 < p.x)
          lp = h;
        else
          lp = -h;
      } else {
        getpoint(E, F, p, q);
        lp = G.y;
      }
      if (lp > rp) swap(lp, rp);
      Q[++c].L = lp, Q[c].R = rp;
    }
  if (!c) {
    ans += det(A, B);
    return;
  }
  sort(Q + 1, Q + c + 1, cmq);
  _c = c, c = 1;
  for (int i = 2; i <= _c; ++i)
    if (Q[i].L < Q[c].R + 1e-7)
      Q[c].R = max(Q[c].R, Q[i].R);
    else
      Q[++c].L = Q[i].L, Q[c].R = Q[i].R;
  Q[0].R = -h, Q[c + 1].L = h;
  for (int i = 0; i <= c; ++i) {
    C.y = Q[i].R, D.y = Q[i + 1].L;
    C.x = (C.y - A.y) * (B.x - A.x) / (B.y - A.y) + A.x;
    D.x = (D.y - A.y) * (B.x - A.x) / (B.y - A.y) + A.x;
    if (A.y < B.y) {
      ans += det(C, D);
    } else {
      ans += det(D, C);
    }
  }
  t1 += clock();
}
int main() {
  scanf("%d%d%d", &n, &h, &f);
  c = 0;
  for (int i = 1; i <= n; ++i) {
    scanf("%lf%lf", &L, &R);
    a[i].ul = L, a[i].ur = R;
    a[i].dl = (double)L * (f + h) / (f - h);
    a[i].dr = (double)R * (f + h) / (f - h);
    Q[++c].L = L, Q[c].R = R;
    Q[++c].L = a[i].dl, Q[c].R = a[i].dr;
    a[n + i].ul = a[i].dl;
    a[n + i].ur = a[i].dr;
    a[n + i].dl = a[i].ul;
    a[n + i].dr = a[i].ur;
  }
  sort(Q + 1, Q + c + 1, cmq);
  _c = c, c = 1;
  for (int i = 2; i <= _c; ++i)
    if (Q[i].L < Q[c].R + 1e-7)
      Q[c].R = max(Q[c].R, Q[i].R);
    else
      Q[++c].L = Q[i].L, Q[c].R = Q[i].R;
  for (int i = 1; i <= c; ++i) ans += 2 * (Q[i].R - Q[i].L) * h;
  for (int i = 1; i <= n + n; ++i) {
    A.x = a[i].ul, A.y = h;
    B.x = a[i].dl, B.y = -h;
    calc(i, A, B);
    A.x = a[i].dr, A.y = -h;
    B.x = a[i].ur, B.y = h;
    calc(i, A, B);
  }
  printf("%.4lf\n", abs(ans) / 2);
  return 0;
}
