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 double EPS = 1e-8;
inline int sign(double a) { return a < -EPS ? -1 : a > EPS; }
struct Point {
  double x, y;
  Point() {}
  Point(double _x, double _y) : x(_x), y(_y) {}
  Point operator+(const Point& p) const { return Point(x + p.x, y + p.y); }
  Point operator-(const Point& p) const { return Point(x - p.x, y - p.y); }
  Point operator*(double d) const { return Point(x * d, y * d); }
  Point operator/(double d) const { return Point(x / d, y / d); }
  bool operator<(const Point& p) const {
    int c = sign(x - p.x);
    if (c) return c == -1;
    return sign(y - p.y) == -1;
  }
  double dot(const Point& p) const { return x * p.x + y * p.y; }
  double det(const Point& p) const { return x * p.y - y * p.x; }
  double alpha() const { return atan2(y, x); }
  double distTo(const Point& p) const {
    double dx = x - p.x, dy = y - p.y;
    return hypot(dx, dy);
  }
  double alphaTo(const Point& p) const {
    double dx = x - p.x, dy = y - p.y;
    return atan2(dy, dx);
  }
  void read() { scanf("%lf%lf", &x, &y); }
  double abs() { return hypot(x, y); }
  double abs2() { return x * x + y * y; }
  void write() { cout << "(" << x << "," << y << ")" << endl; }
};
Point isSS(Point p1, Point p2, Point q1, Point q2) {
  double a1 = ((q2.x - q1.x) * (p1.y - q1.y) - (p1.x - q1.x) * (q2.y - q1.y)),
         a2 = -((q2.x - q1.x) * (p2.y - q1.y) - (p2.x - q1.x) * (q2.y - q1.y));
  return (p1 * a2 + p2 * a1) / (a1 + a2);
}
int n, h, f;
const int MAX_N = 500 + 10;
int l[MAX_N], r[MAX_N];
vector<Point> ps[MAX_N];
vector<Point> convexCut(const vector<Point>& ps, Point q1, Point q2) {
  vector<Point> qs;
  int n = ps.size();
  for (int i = 0; i < n; ++i) {
    Point p1 = ps[i], p2 = ps[(i + 1) % n];
    int d1 = sign(
            ((q2.x - q1.x) * (p1.y - q1.y) - (p1.x - q1.x) * (q2.y - q1.y))),
        d2 = sign(
            ((q2.x - q1.x) * (p2.y - q1.y) - (p2.x - q1.x) * (q2.y - q1.y)));
    if (d1 >= 0) qs.push_back(p1);
    if (d1 * d2 < 0) qs.push_back(isSS(p1, p2, q1, q2));
  }
  return qs;
}
double calcArea(const vector<Point>& ps) {
  int n = ps.size();
  double ret = 0;
  for (int i = 0; i < n; ++i) {
    ret += ps[i].det(ps[(i + 1) % n]);
  }
  return ret / 2;
}
vector<Point> convexHull(vector<Point> ps) {
  int n = ps.size();
  if (n <= 1) return ps;
  sort(ps.begin(), ps.end());
  vector<Point> qs;
  for (int i = 0; i < n; qs.push_back(ps[i++])) {
    while (qs.size() > 1 &&
           sign(((qs.back().x - qs[qs.size() - 2].x) *
                     (ps[i].y - qs[qs.size() - 2].y) -
                 (ps[i].x - qs[qs.size() - 2].x) *
                     (qs.back().y - qs[qs.size() - 2].y))) <= 0)
      qs.pop_back();
  }
  for (int i = n - 2, t = qs.size(); i >= 0; qs.push_back(ps[i--])) {
    while (qs.size() > t &&
           sign(((qs.back().x - qs[qs.size() - 2].x) *
                     (ps[i].y - qs[qs.size() - 2].y) -
                 (ps[i].x - qs[qs.size() - 2].x) *
                     (qs.back().y - qs[qs.size() - 2].y))) <= 0)
      qs.pop_back();
  }
  qs.pop_back();
  return qs;
}
vector<Point> build(double l, double r, double l2, double r2) {
  vector<Point> ps;
  ps.push_back(Point(l, h));
  ps.push_back(Point(r, h));
  ps.push_back(Point(r2, 0));
  ps.push_back(Point(l2, 0));
  return convexHull(ps);
}
double is(vector<Point> ps, vector<Point> qs) {
  for (int i = 0; i < ps.size(); ++i) {
    qs = convexCut(qs, ps[i], ps[(i + 1) % ps.size()]);
  }
  return calcArea(qs);
}
int main() {
  cin >> n >> h >> f;
  vector<vector<Point> > low, up;
  for (int i = 0; i < n; ++i) {
    double l, r;
    cin >> l >> r;
    double l2 = l / (f - h) * f, r2 = r / (f - h) * f;
    low.push_back(build(l, r, l2, r2));
    double l3 = l / (f - h) * (f + h), r3 = r / (f - h) * (f + h);
    up.push_back(build(l3, r3, l2, r2));
  }
  double ans = 0;
  for (int i = 0; i < n; ++i) {
    ans += calcArea(low[i]);
    ans += calcArea(up[i]);
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      ans -= is(low[i], up[j]);
    }
  }
  ans *= 2;
  printf("%0.10lf\n", ans);
  return 0;
}