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 point {
  double x, y;
  point() {}
  point(double _x, double _y) : x(_x), y(_y) {}
  point operator-(const point p1) { return point(x - p1.x, y - p1.y); }
};
double cross(const point &a, const point &b, const point &c) {
  return (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x);
}
double cross(const point &a, const point &b) { return a.x * b.y - a.y * b.x; }
double dot(const point &a, const point &b) { return a.x * b.x + a.y * b.y; }
point its(const point &a, const point &b, const point &c, const point &d) {
  point 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;
}
int n;
point p[1010][4];
pair<double, int> e[5000];
int cnt;
inline void insert(point &s, point &t, point X, int inc) {
  double ratio = ((t.x - s.x) > 1e-8 ? 1 : ((t.x - s.x) > -1e-8 ? 0 : -1))
                     ? (X.x - s.x) / (t.x - s.x)
                     : (X.y - s.y) / (t.y - s.y);
  e[cnt++] = make_pair(ratio, inc);
}
double solve() {
  double ans = 0.0;
  int cp0, cp1, cp2;
  for (int i = 0; i < n; i++) {
    for (int k = 0; k < 4; k++) {
      point &s = p[i][k], &t = p[i][k == 3 ? 0 : k + 1];
      cnt = 0;
      e[cnt++] = make_pair(0.0, 1);
      e[cnt++] = make_pair(1.0, -1);
      for (int j = 0; j < n; j++)
        if (i != j) {
          for (int l = 0; l < 4; l++) {
            cp0 =
                ((cross(s, t, p[j][l == 0 ? 3 : l - 1])) > 1e-8
                     ? 1
                     : ((cross(s, t, p[j][l == 0 ? 3 : l - 1])) > -1e-8 ? 0
                                                                        : -1));
            cp1 = ((cross(s, t, p[j][l])) > 1e-8
                       ? 1
                       : ((cross(s, t, p[j][l])) > -1e-8 ? 0 : -1));
            cp2 =
                ((cross(s, t, p[j][l == 3 ? 0 : l + 1])) > 1e-8
                     ? 1
                     : ((cross(s, t, p[j][l == 3 ? 0 : l + 1])) > -1e-8 ? 0
                                                                        : -1));
            if (cp1 * cp2 < 0)
              insert(s, t, its(s, t, p[j][l], p[j][l == 3 ? 0 : l + 1]), cp2);
            else if (!cp1 && cp0 * cp2 < 0)
              insert(s, t, p[j][l], cp2);
            else if (!cp1 && !cp2 && j > i &&
                     dot(t - s, p[j][l == 3 ? 0 : l + 1] - p[j][l]) > -1e-8) {
              insert(s, t, p[j][l], -1);
              insert(s, t, p[j][l == 3 ? 0 : l + 1], 1);
            }
          }
        }
      sort(e, e + cnt);
      int acc = 0;
      double total = 0.0, last;
      for (int j = 0; j < cnt; j++) {
        acc += e[j].second;
        if (acc == 0 && e[j].second < 0) total += e[j].first - last;
        last = e[j].first;
      }
      ans += cross(s, t) * total;
    }
  }
  return ans * 0.5;
}
double h, f;
int main() {
  scanf("%d%lf%lf", &n, &h, &f);
  point p1(0, -f), p2(0, f);
  for (int i = 0; i < n; ++i) {
    double l, r;
    scanf("%lf%lf", &l, &r);
    p[i * 2][0] = point(l, -h);
    p[i * 2][1] = point(r, -h);
    p[i * 2][2] = its(p1, point(r, -h), point(0, h), point(100, h));
    p[i * 2][3] = its(p1, point(l, -h), point(0, h), point(100, h));
    p[i * 2 + 1][0] = point(r, h);
    p[i * 2 + 1][1] = point(l, h);
    p[i * 2 + 1][2] = its(p2, point(l, h), point(0, -h), point(100, -h));
    p[i * 2 + 1][3] = its(p2, point(r, h), point(0, -h), point(100, -h));
  }
  n *= 2;
  printf("%.10lf\n", solve());
  return 0;
}
