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 = 500;
int n;
double f, h;
struct Trapezoid {
  double ul, ur, dl, dr;
  Trapezoid(double _ul, double _ur, double _dl, double _dr)
      : ul(_ul), ur(_ur), dl(_dl), dr(_dr) {}
  double area() { return (ur - ul + dr - dl) * h / 2; }
  void print() { 1; }
};
vector<Trapezoid> type1;
struct Point {
  double x, y;
  Point(double _x, double _y) : x(_x), y(_y) {}
};
double cross(Point o, Point a, Point b) {
  return (a.x - o.x) * (b.y - o.y) - (a.y - o.y) * (b.x - o.x);
}
Point inter(Point a, Point b, Point c, Point d) {
  double u = cross(a, b, c), v = cross(a, b, d);
  return Point((c.x * v - d.x * u) / (v - u), (c.y * v - d.y * u) / (v - u));
}
double area(vector<Point> ps) {
  double res = 0;
  for (int i = (1); i <= (ps.size() - 1); i++)
    res += cross(Point(0, 0), ps[i - 1], ps[i]);
  res += cross(Point(0, 0), ps.back(), ps.front());
  return abs(res / 2);
}
double area3(Point a, Point b, Point c) { return abs(cross(a, b, c) / 2); }
double area4(Point a, Point b, Point c, Point d) {
  vector<Point> v;
  v.push_back(a);
  v.push_back(b);
  v.push_back(c);
  v.push_back(d);
  return area(v);
}
double area5(Point a, Point b, Point c, Point d, Point e) {
  vector<Point> v;
  v.push_back(a);
  v.push_back(b);
  v.push_back(c);
  v.push_back(d);
  v.push_back(e);
  return area(v);
}
double inter(Trapezoid a, Trapezoid b) {
  1;
  if (a.dl > b.dl) swap(a, b);
  Point aul(a.ul, h), aur(a.ur, h), adl(a.dl, 0), adr(a.dr, 0);
  Point bul(b.ul, h), bur(b.ur, h), bdl(b.dl, 0), bdr(b.dr, 0);
  Point pll = inter(aul, adl, bul, bdl), plr = inter(aul, adl, bur, bdr),
        prl = inter(aur, adr, bul, bdl), prr = inter(aur, adr, bur, bdr);
  if (a.ur <= b.ul)
    return 0;
  else if (a.ul <= b.ul) {
    if (a.ur <= b.ur) {
      return area3(bul, aur, prl);
    } else {
      return area4(bul, bur, prr, prl);
    }
  } else {
    if (a.ur <= b.ur) {
      return area4(aul, pll, prl, aur);
    } else if (a.ul <= b.ur) {
      return area5(aul, pll, prl, prr, bur);
    } else {
      return area4(pll, prl, prr, plr);
    }
  }
}
double spinter(Trapezoid a, Trapezoid b) {
  1;
  Point aul(a.ul, h), aur(a.ur, h), adl(a.dl, 0), adr(a.dr, 0);
  Point bul(b.ul, h), bur(b.ur, h), bdl(b.dl, 0), bdr(b.dr, 0);
  Point pll = inter(aul, adl, bul, bdl), plr = inter(aul, adl, bur, bdr),
        prl = inter(aur, adr, bul, bdl), prr = inter(aur, adr, bur, bdr);
  if (a.ur <= b.ul)
    return area3(prl, adl, adr);
  else if (a.ul <= b.ul) {
    if (a.ur <= b.ur) {
      return area4(bul, adl, adr, aur);
    } else {
      return b.area();
    }
  } else {
    if (a.ur <= b.ur) {
      return a.area();
    } else if (a.ul <= b.ur) {
      return area4(aul, adl, adr, bur);
    } else {
      return area3(plr, adl, adr);
    }
  }
}
pair<double, double> win[MAXN + 10];
int main() {
  scanf("%d%lf%lf", &n, &h, &f);
  for (int i = 0; i < (n); i++) scanf("%lf%lf", &win[i].first, &win[i].second);
  double ans = 0;
  for (int i = 0; i < (n); i++) {
    type1.push_back(Trapezoid(win[i].first, win[i].second,
                              f * win[i].first / (f - h),
                              f * win[i].second / (f - h))),
        ans += type1.back().area();
    1, type1.back().print(), 1;
  }
  for (int i = 0; i < (n); i++) {
    Trapezoid type2((f + h) * win[i].first / (f - h),
                    (f + h) * win[i].second / (f - h),
                    f * win[i].first / (f - h), f * win[i].second / (f - h));
    ans -= spinter(type1[i], type2);
    for (int j = (0); j <= (n - 1); j++)
      if (j != i) {
        ans -= inter(type1[j], type2);
      }
    ans += type2.area();
  }
  printf("%.9f\n", ans * 2);
  return 0;
}