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;
inline int cmp(double a, double b) {
  return (a < b - 1e-6) ? -1 : ((a > b + 1e-6) ? 1 : 0);
}
struct Point {
  double x, y;
  Point(double x = 0.0, double y = 0.0) : x(x), y(y) {}
  Point operator+(Point a) { return Point(x + a.x, y + a.y); }
  Point operator-(Point a) { return Point(x - a.x, y - a.y); }
  Point operator*(double k) { return Point(x * k, y * k); }
  Point operator/(double k) { return Point(x / k, y / k); }
  double operator*(Point a) { return x * a.x + y * a.y; }
  double operator%(Point a) { return x * a.y - y * a.x; }
  int cmp(Point q) const {
    if (int t = ::cmp(x, q.x)) return t;
    return ::cmp(y, q.y);
  }
  bool operator>(Point q) const { return cmp(q) > 0; }
  bool operator<(Point q) const { return cmp(q) < 0; }
  bool operator==(Point q) const { return cmp(q) == 0; }
  bool operator>=(Point q) const { return cmp(q) >= 0; }
  bool operator<=(Point q) const { return cmp(q) <= 0; }
  bool operator!=(Point q) const { return cmp(q) != 0; }
  Point conj() { return Point(x, -y); }
  double norm() { return x * x + y * y; }
  double len() { return sqrt(norm()); }
  Point rotate(double alpha) {
    double cosa = cos(alpha), sina = sin(alpha);
    return Point(x * cosa - y * sina, x * sina + y * cosa);
  }
};
int ccw(Point a, Point b, Point c) { return cmp((b - a) % (c - a), 0); }
struct Line {
  double a, b, c;
  Point A, B;
  Line(double a = 0.0, double b = 0.0, double c = 0.0) : a(a), b(b), c(c) {}
  Line(Point A, Point B) : A(A), B(B) {
    a = B.y - A.y;
    b = A.x - B.x;
    c = -(a * A.x + b * A.y);
  }
  Line(Point P, double m) {
    a = -m;
    b = 1;
    c = -((a * P.x) + (b * P.y));
  }
  double f(Point A) { return a * A.x + b * A.y + c; }
};
bool areParallel(Line l1, Line l2) {
  return cmp(l1.a * l2.b, l1.b * l2.a) == 0;
}
bool areIntersect(Line l1, Line l2, Point &p) {
  if (areParallel(l1, l2)) return false;
  double dx = l1.b * l2.c - l2.b * l1.c;
  double dy = l1.c * l2.a - l2.c * l1.a;
  double d = l1.a * l2.b - l2.a * l1.b;
  p = Point(dx / d, dy / d);
  return true;
}
vector<Point> polygon_cut(const vector<Point> &P, Line l) {
  vector<Point> Q;
  for (int i = 0; i < P.size(); ++i) {
    Point A = P[i], B = (i == P.size() - 1) ? P[0] : P[i + 1];
    if (ccw(l.A, l.B, A) != -1) Q.push_back(A);
    if (ccw(l.A, l.B, A) * ccw(l.A, l.B, B) < 0) {
      Point p;
      areIntersect(Line(A, B), l, p);
      Q.push_back(p);
    }
  }
  return Q;
}
double signed_area(vector<Point> p) {
  double area = 0;
  for (int i = 0; i < p.size(); i++) {
    int j = (i + 1) % p.size();
    area += p[i].x * p[j].y - p[j].x * p[i].y;
  }
  return area / 2.0;
}
double area(const vector<Point> &p) { return fabs(signed_area(p)); }
const int MN = 511;
int n, h, f;
pair<int, int> windows[MN];
pair<Line, Line> visible[2][MN];
int main() {
  ios ::sync_with_stdio(false);
  while (cin >> n >> h >> f) {
    for (int i = (1), _b = (n); i <= _b; i++)
      cin >> windows[i].first >> windows[i].second;
    Line topWall(Point(0, h), 0.0);
    Line bottomWall(Point(0, -h), 0.0);
    for (int i = (1), _b = (n); i <= _b; i++) {
      visible[0][i].first = Line(Point(0, f), Point(windows[i].first, h));
      visible[0][i].second = Line(Point(0, f), Point(windows[i].second, h));
      visible[1][i].first = Line(Point(0, -f), Point(windows[i].first, -h));
      visible[1][i].second = Line(Point(0, -f), Point(windows[i].second, -h));
    }
    double res = 0.0;
    for (int i = (1), _b = (n); i <= _b; i++) {
      double top = windows[i].second - windows[i].first;
      Point A, B;
      assert(areIntersect(bottomWall, visible[0][i].first, A));
      assert(areIntersect(bottomWall, visible[0][i].second, B));
      double bottom = B.x - A.x;
      res += (top + bottom) * h;
    }
    for (int i = (1), _b = (n); i <= _b; i++) {
      double bottom = windows[i].second - windows[i].first;
      Point A, B;
      assert(areIntersect(topWall, visible[1][i].first, A));
      assert(areIntersect(topWall, visible[1][i].second, B));
      double top = B.x - A.x;
      res += (top + bottom) * h;
      Point C(windows[i].second, -h);
      Point D(windows[i].first, -h);
      for (int j = (1), _b = (n); j <= _b; j++) {
        vector<Point> cur;
        cur.push_back(A);
        cur.push_back(B);
        cur.push_back(C);
        cur.push_back(D);
        Point X(windows[j].first, h);
        Point Y(windows[j].second, h);
        Point Z, T;
        areIntersect(bottomWall, visible[0][j].first, T);
        areIntersect(bottomWall, visible[0][j].second, Z);
        cur = polygon_cut(cur, Line(X, T));
        cur = polygon_cut(cur, Line(Z, Y));
        res -= area(cur);
      }
    }
    cout << (fixed) << setprecision(10) << res << endl;
  }
  return 0;
}
