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;
bool doubleEqual(double a, double b) {
  double eps = 1e-9;
  return fabs(a - b) < eps;
}
bool doubleLess(double a, double b) { return a < b && !doubleEqual(a, b); }
bool doubleLessOrEqual(double a, double b) {
  return a < b || doubleEqual(a, b);
}
struct Point {
  double x, y;
  void scan() { scanf("%lf%lf", &x, &y); }
  Point() : x(0), y(0) {}
  Point(double x, double y) : x(x), y(y) {}
  Point operator-(Point p) { return Point(x - p.x, y - p.y); }
  Point operator+(Point p) { return Point(x + p.x, y + p.y); }
  Point operator*(double k) { return Point(x * k, y * k); }
  Point operator/(double k) { return Point(x / k, y / k); }
  double operator*(const Point& p) const { return x * p.y - y * p.x; }
  double operator%(const Point& p) const { return x * p.x + y * p.y; }
  bool isIn(Point A, Point B) {
    Point C = *this;
    return doubleLessOrEqual((A - C) % (B - C), 0);
  }
  bool isIn(vector<Point>& v) {
    Point M = *this;
    bool pl = false;
    bool mi = false;
    for (int i = 0; i < 4; i++) {
      double s = (v[i] - M) * (v[i + 1] - M);
      if (doubleEqual(s, 0)) {
        continue;
      }
      if (s < 0) {
        mi = true;
      } else {
        pl = true;
      }
    }
    return !pl || !mi;
  }
  bool operator<(const Point& p) const {
    if (!doubleEqual(x, p.x)) {
      return x < p.x;
    }
    return doubleLess(y, p.y);
  }
  Point operator~() { return Point(x, -y); }
};
const int maxN = 100500;
vector<Point> p[maxN];
vector<Point> q[maxN];
bool cmp(const Point& A, const Point& B) {
  double s = B * A;
  return doubleLess(s, 0);
}
void convex(vector<Point>& v) {
  int num = min_element(v.begin(), v.end()) - v.begin();
  swap(v[0], v[num]);
  int len = v.size();
  for (int i = 1; i < len; i++) {
    v[i] = v[i] - v[0];
  }
  v[0] = Point();
  sort(v.begin() + 1, v.end(), cmp);
}
double getArea(vector<Point>& v) {
  convex(v);
  int len = v.size();
  v.push_back(v[0]);
  double res = 0;
  for (int i = 0; i < len; i++) {
    res += v[i] * v[i + 1];
  }
  res = fabs(res) / 2;
  return res;
}
bool getIntersect(Point A, Point B, Point C, Point D, Point& M) {
  double s1 = (C - A) * (D - A);
  double s2 = (D - B) * (C - B);
  double s = s1 + s2;
  if (doubleEqual(s, 0)) {
    return false;
  }
  Point v = B - A;
  v = v / s;
  v = v * s1;
  M = v + A;
  return true;
}
double getArea(vector<Point>& v, vector<Point>& u) {
  set<Point> s;
  for (int i = 0; i < 4; i++) {
    if (v[i].isIn(u)) {
      s.insert(v[i]);
    }
    if (u[i].isIn(v)) {
      s.insert(u[i]);
    }
  }
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 4; j++) {
      Point A = v[i];
      Point B = v[i + 1];
      Point C = u[j];
      Point D = u[j + 1];
      Point M;
      if (!getIntersect(A, B, C, D, M)) {
        continue;
      }
      if (M.isIn(A, B) && M.isIn(C, D)) {
        s.insert(M);
      }
    }
  }
  vector<Point> w;
  if (s.empty()) {
    return 0;
  }
  while (!s.empty()) {
    w.push_back(*s.begin());
    s.erase(s.begin());
  }
  double res = getArea(w);
  return res;
}
int main() {
  int n;
  double f, h;
  scanf("%d%lf%lf", &n, &h, &f);
  double res = 0;
  for (int i = 0; i < n; i++) {
    double x1, x2;
    scanf("%lf%lf", &x1, &x2);
    double dx = x2 - x1;
    res += 2 * 2 * f * h / (f - h) * dx;
    Point A(x1, h);
    Point B(x2, h);
    double x1_ = x1 * (h + f) / (f - h);
    double x2_ = x2 * (h + f) / (f - h);
    Point C(x1_, -h);
    Point D(x2_, -h);
    p[i].push_back(A);
    p[i].push_back(B);
    p[i].push_back(D);
    p[i].push_back(C);
    p[i].push_back(A);
    q[i].push_back(~A);
    q[i].push_back(~B);
    q[i].push_back(~D);
    q[i].push_back(~C);
    q[i].push_back(~A);
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      double s = getArea(p[i], q[j]);
      res -= s;
    }
  }
  printf("%.10lf\n", res);
  return 0;
}
