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;
struct pt {
  double x, y;
  pt() {}
  pt(double _x, double _y) : x(_x), y(_y) {}
  pt operator-(const pt p1) { return pt(x - p1.x, y - p1.y); }
  pt operator+(const pt p1) { return pt(x + p1.x, y + p1.y); }
  pt operator*(double s) { return pt(x * s, y * s); }
  pt operator/(double s) { return pt(x / s, y / s); }
  bool operator<(const pt p1) const {
    return y < p1.y - 1e-8 || y < p1.y + 1e-8 && x < p1.x;
  }
};
inline double cpr(const pt &a, const pt &b, const pt &c) {
  return (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x);
}
inline double cpr(const pt &a, const pt &b) { return a.x * b.y - a.y * b.x; }
inline double dpr(const pt &a, const pt &b, const pt &c) {
  return (b.x - a.x) * (c.x - a.x) + (b.y - a.y) * (c.y - a.y);
}
inline double dpr(const pt &a, const pt &b) { return a.x * b.x + a.y * b.y; }
pt its(const pt &a, const pt &b, const pt &c, const pt &d) {
  pt ret = a;
  double t = ((c.x - a.x) * (d.y - c.y) - (c.y - a.y) * (d.x - c.x)) /
             ((b.x - a.x) * (d.y - c.y) - (b.y - a.y) * (d.x - c.x));
  ret.x += (b.x - a.x) * t;
  ret.y += (b.y - a.y) * t;
  return ret;
}
void half_its(pt &a, pt &b, pt pol[], int &polcnt, pt exch[]) {
  int i, p2 = 0;
  bool now, last = cpr(a, b, pol[polcnt - 1]) > -1e-8;
  for (i = 0; i < polcnt; i++) {
    now = cpr(a, b, pol[i]) > -1e-8;
    if (now ^ last)
      exch[p2++] = its(a, b, pol[i], pol[(i + polcnt - 1) % polcnt]);
    if (now) exch[p2++] = pol[i];
    last = now;
  }
  polcnt = p2;
  for (i = 0; i < p2; i++) pol[i] = exch[i];
}
int n;
double hh, ff, l[600], r[600];
pt p[50], ex[50];
pt a[600], b[600], c[600], d[600];
pt e[600], f[600], g[600], h[600];
double solve(int i, int j) {
  p[0] = pt(-1e20, hh);
  p[1] = pt(-1e20, -hh);
  p[2] = pt(1e20, -hh);
  p[3] = pt(1e20, hh);
  int m = 4;
  half_its(a[i], c[i], p, m, ex);
  half_its(d[i], b[i], p, m, ex);
  half_its(e[j], g[j], p, m, ex);
  half_its(h[j], f[j], p, m, ex);
  double res = 0.0;
  p[m] = p[0];
  for (int i = 0; i < m; i++) {
    res += cpr(p[i], p[i + 1]);
  }
  return res / 2.0;
}
int main() {
  scanf("%d %lf %lf", &n, &hh, &ff);
  double itsa = 0.0;
  for (int i = 0; i < n; i++) {
    scanf("%lf %lf", &l[i], &r[i]);
    a[i] = pt(l[i], hh);
    b[i] = pt(r[i], hh);
    c[i] = pt(l[i] * (ff + hh) / (ff - hh), -hh);
    d[i] = pt(r[i] * (ff + hh) / (ff - hh), -hh);
    itsa += cpr(a[i], c[i], d[i]) + cpr(a[i], d[i], b[i]);
    e[i] = pt(c[i].x, -c[i].y);
    f[i] = pt(d[i].x, -d[i].y);
    g[i] = pt(a[i].x, -a[i].y);
    h[i] = pt(b[i].x, -b[i].y);
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      itsa -= solve(i, j);
    }
  }
  printf("%f\n", itsa);
  return 0;
}