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); }
  void read() { scanf("%lf %lf", &x, &y); }
  void out() { printf("(%.2lf %.2lf)", x, y); }
};
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);
}
double cpr(const pt &a, const pt &b) { return a.x * b.y - a.y * b.x; }
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;
}
int n;
pt p[1010][4];
pair<double, int> e[5000];
int cnt;
inline void insert(pt &s, pt &t, pt 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 get_ans() {
  double ans = 0.0;
  int cp0, cp1, cp2;
  for (int i = 0; i < n; i++) {
    for (int k = 0; k < 4; k++) {
      pt &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 = ((cpr(s, t, p[j][l == 0 ? 3 : l - 1])) > 1e-8
                       ? 1
                       : ((cpr(s, t, p[j][l == 0 ? 3 : l - 1])) > -1e-8 ? 0
                                                                        : -1));
            cp1 = ((cpr(s, t, p[j][l])) > 1e-8
                       ? 1
                       : ((cpr(s, t, p[j][l])) > -1e-8 ? 0 : -1));
            cp2 = ((cpr(s, t, p[j][l == 3 ? 0 : l + 1])) > 1e-8
                       ? 1
                       : ((cpr(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 &&
                     dpr(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 += cpr(s, t) * total;
    }
  }
  return ans * 0.5;
}
bool solve() {
  double h, f;
  if (scanf("%d%lf%lf", &n, &h, &f) == EOF) return false;
  pt 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] = pt(l, -h);
    p[i * 2][1] = pt(r, -h);
    p[i * 2][2] = its(p1, pt(r, -h), pt(0, h), pt(100, h));
    p[i * 2][3] = its(p1, pt(l, -h), pt(0, h), pt(100, h));
    p[i * 2 + 1][0] = pt(r, h);
    p[i * 2 + 1][1] = pt(l, h);
    p[i * 2 + 1][2] = its(p2, pt(l, h), pt(0, -h), pt(100, -h));
    p[i * 2 + 1][3] = its(p2, pt(r, h), pt(0, -h), pt(100, -h));
  }
  n *= 2;
  printf("%.10lf\n", get_ans());
  return true;
}
int main() {
  while (solve())
    ;
  return 0;
}