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;
bool EQ(double a, double b) {
  double eps = 1e-9;
  return fabs(a - b) < eps;
}
bool LT(double a, double b) { return a < b && !EQ(a, b); }
bool LTE(double a, double b) { return a < b || EQ(a, b); }
struct Point {
  double x, y;
  Point(double x = 0, double y = 0) : 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 inside(Point A, Point B) {
    Point C = *this;
    return LTE((A - C) % (B - C), 0);
  }
  bool inside(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 (EQ(s, 0)) {
        continue;
      }
      if (s < 0) {
        mi = true;
      } else {
        pl = true;
      }
    }
    return !pl || !mi;
  }
  bool operator<(const Point& p) const {
    if (!EQ(x, p.x)) {
      return x < p.x;
    }
    return LT(y, p.y);
  }
  void scan() { scanf("%lf%lf", &x, &y); }
  Point turn() { return Point(x, -y); }
};
const int maxN = 100006;
vector<Point> p[maxN];
vector<Point> q[maxN];
bool cmp(const Point& A, const Point& B) {
  double s = B * A;
  return LT(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 calcArea(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 intersects(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 (EQ(s, 0)) {
    return false;
  }
  Point v = B - A;
  v = v / s;
  v = v * s1;
  M = v + A;
  return true;
}
double calcArea(vector<Point>& v, vector<Point>& u) {
  set<Point> s;
  for (int i = 0; i < 4; i++) {
    if (v[i].inside(u)) {
      s.insert(v[i]);
    }
    if (u[i].inside(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 (!intersects(A, B, C, D, M)) continue;
      if (M.inside(A, B) && M.inside(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());
  }
  return calcArea(w);
}
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);
    res += 2 * 2 * f * h / (f - h) * (x2 - x1);
    Point A(x1, h);
    Point B(x2, h);
    Point C(x1 * (h + f) / (f - h), -h);
    Point D(x2 * (h + f) / (f - h), -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.turn());
    q[i].push_back(B.turn());
    q[i].push_back(D.turn());
    q[i].push_back(C.turn());
    q[i].push_back(A.turn());
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) res -= calcArea(p[i], q[j]);
  printf("%.8lf\n", res);
  return 0;
}