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;
const int MAXN = 505;
const double EPS = 1e-8;
int n, h, f;
struct INTERVAL {
  int l, r;
} a[MAXN];
double ans = 0;
struct POINT {
  double x, y;
  POINT() { x = y = 0; }
  POINT(double tx, double ty) {
    x = tx;
    y = ty;
  }
};
POINT ch[20];
int pn = 0;
POINT stk[20];
int top = 0;
inline double Fabs(double t) {
  if (t > 0) return t;
  return -t;
}
inline double Ral(POINT a, POINT b, POINT c, POINT d) {
  double dx1 = b.x - a.x, dy1 = b.y - a.y;
  double dx2 = d.x - c.x, dy2 = d.y - c.y;
  return dx1 * dy2 - dx2 * dy1;
}
void chk1(POINT t, POINT a, POINT b, POINT c) {
  double s1 = Fabs(a.x * b.y + b.x * c.y + c.x * a.y - a.y * b.x - b.y * c.x -
                   c.y * a.x);
  double s2 = Fabs(a.x * b.y + b.x * t.y + t.x * a.y - a.y * b.x - b.y * t.x -
                   t.y * a.x) +
              Fabs(a.x * t.y + t.x * c.y + c.x * a.y - a.y * t.x - t.y * c.x -
                   c.y * a.x) +
              Fabs(t.x * b.y + b.x * c.y + c.x * t.y - t.y * b.x - b.y * c.x -
                   c.y * t.x);
  if (Fabs(s1 - s2) > EPS) return;
  pn++;
  ch[pn] = t;
}
void chk2(POINT a1, POINT a2, POINT b1, POINT b2) {
  if (Ral(a1, a2, a1, b1) * Ral(a1, a2, a1, b2) < -EPS &&
      Ral(b1, b2, b1, a1) * Ral(b1, b2, b1, a2) < -EPS) {
    POINT o;
    double t1 = (a2.y - a1.y) * a1.x + (a1.x - a2.x) * a1.y;
    double t2 = (b2.y - b1.y) * b1.x + (b1.x - b2.x) * b1.y;
    double k = (a2.x - a1.x) * (b2.y - b1.y) - (b2.x - b1.x) * (a2.y - a1.y);
    double k1 = t2 * (a2.x - a1.x) - t1 * (b2.x - b1.x);
    double k2 = t2 * (a2.y - a1.y) - t1 * (b2.y - b1.y);
    o.x = k1 / k;
    o.y = k2 / k;
    pn++;
    ch[pn] = o;
  }
}
inline bool cmp(const POINT &a, const POINT &b) {
  return a.x < b.x - EPS || Fabs(a.x - b.x) < EPS && a.y < b.y;
}
void work(int p, int q) {
  POINT a1(0, f), a2((double)(f + h) / (f - h) * a[p].l, -h),
      a3((double)(f + h) / (f - h) * a[p].r, -h);
  POINT b1(0, -f), b2((double)(f + h) / (f - h) * a[q].l, h),
      b3((double)(f + h) / (f - h) * a[q].r, h);
  pn = 0;
  chk1(a1, b1, b2, b3);
  chk1(a2, b1, b2, b3);
  chk1(a3, b1, b2, b3);
  chk1(b1, a1, a2, a3);
  chk1(b2, a1, a2, a3);
  chk1(b3, a1, a2, a3);
  chk2(a1, a2, b1, b2);
  chk2(a1, a2, b2, b3);
  chk2(a1, a2, b3, b1);
  chk2(a2, a3, b1, b2);
  chk2(a2, a3, b2, b3);
  chk2(a2, a3, b3, b1);
  chk2(a3, a1, b1, b2);
  chk2(a3, a1, b2, b3);
  chk2(a3, a1, b3, b1);
  sort(ch + 1, ch + pn + 1, cmp);
  if (pn <= 2) return;
  top = 0;
  stk[++top] = ch[1];
  for (int i = 2; i <= pn; i++) {
    while (top != 1 && Ral(stk[top - 1], stk[top], stk[top], ch[i]) > -EPS)
      top--;
    stk[++top] = ch[i];
  }
  int len = top;
  for (int i = pn - 1; i >= 1; i--) {
    while (top != len && Ral(stk[top - 1], stk[top], stk[top], ch[i]) > -EPS)
      top--;
    stk[++top] = ch[i];
  }
  double s = 0;
  stk[top + 1] = stk[1];
  for (int i = 1; i <= top; i++)
    s += stk[i].x * stk[i + 1].y - stk[i].y * stk[i + 1].x;
  ans -= Fabs(s) / 2;
}
int main() {
  cin >> n >> h >> f;
  for (int i = 1; i <= n; i++) cin >> a[i].l >> a[i].r;
  for (int i = 1; i <= n; i++) ans += 4.0 * f * h / (f - h) * (a[i].r - a[i].l);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) work(i, j);
  cout << setiosflags(ios::fixed) << setprecision(10) << ans << endl;
  return 0;
}