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;
inline double det(double a, double b, double c, double d) {
  return a * d - b * c;
}
const double eps = 1e-9;
int n, h, f;
int l[555], r[555];
double L[555], R[555];
bool in(int i, double x, double y) {
  if (fabs(y) > h + eps) return false;
  if (x + eps < l[i] + (L[i] - l[i]) * (h - y) / (2 * h)) return false;
  if (x - eps > r[i] + (R[i] - r[i]) * (h - y) / (2 * h)) return false;
  return true;
}
pair<double, double> cross(
    const pair<pair<double, double>, pair<double, double> > &p,
    const pair<pair<double, double>, pair<double, double> > &q) {
  double a1 = p.second.second - p.first.second,
         b1 = p.first.first - p.second.first,
         c1 = a1 * p.first.first + b1 * p.first.second;
  double a2 = q.second.second - q.first.second,
         b2 = q.first.first - q.second.first,
         c2 = a2 * q.first.first + b2 * q.first.second;
  double d = det(a1, b1, a2, b2);
  if (fabs(d) < eps) return pair<double, double>(0, f);
  return {det(c1, b1, c2, b2) / d, det(a1, c1, a2, c2) / d};
}
void CH(vector<pair<double, double> > &S) {
  for (int i(1); i < int((S).size()); ++i)
    if (S[i].first + eps < S[0].first ||
        S[i].first < S[0].first + eps && S[i].second < S[0].second)
      swap(S[i], S[0]);
  for (int i = int((S).size()); i-- > 0;) {
    S[i].first -= S[0].first;
    S[i].second -= S[0].second;
  }
  sort((S).begin(), (S).end(),
       [](const pair<double, double> &p, const pair<double, double> &q) {
         double d = det(p.first, p.second, q.first, q.second);
         if (fabs(d) > eps) return d < 0;
         return fabs(p.first) + fabs(p.second) < fabs(q.first) + fabs(q.second);
       });
  auto rght = [](const pair<double, double> &p, const pair<double, double> &q,
                 const pair<double, double> &r) {
    return det(p.first - r.first, p.second - r.second, q.first - r.first,
               q.second - r.second) < eps;
  };
  vector<pair<double, double> > ch;
  for (pair<double, double> &p : S) {
    for (; int((ch).size()) > 1 &&
           rght(ch[int((ch).size()) - 1], ch[int((ch).size()) - 2], p);
         ch.pop_back())
      ;
    ch.push_back(p);
  }
  S.swap(ch);
}
int main() {
  cin >> n >> h >> f;
  double res = 0;
  for (int i(0); i < n; ++i) {
    cin >> l[i] >> r[i];
    L[i] = l[i] * double(f + h) / (f - h);
    R[i] = r[i] * double(f + h) / (f - h);
    res += (r[i] + R[i] - l[i] - L[i]) * h;
  }
  res *= 2;
  for (int i(0); i < n; ++i)
    for (int j(0); j < n; ++j) {
      pair<pair<double, double>, pair<double, double> > a[2], b[2];
      a[0] = {pair<double, double>(l[i], h), pair<double, double>(L[i], -h)};
      a[1] = {pair<double, double>(r[i], h), pair<double, double>(R[i], -h)};
      b[0] = {pair<double, double>(L[j], h), pair<double, double>(l[j], -h)};
      b[1] = {pair<double, double>(R[j], h), pair<double, double>(r[j], -h)};
      vector<pair<double, double> > S;
      for (int k(0); k < 2; ++k) {
        if (in(i, b[k].first.first, b[k].first.second)) S.push_back(b[k].first);
        if (in(i, b[k].second.first, b[k].second.second))
          S.push_back(b[k].second);
        if (in(j, a[k].first.first, -a[k].first.second))
          S.push_back(a[k].first);
        if (in(j, a[k].second.first, -a[k].second.second))
          S.push_back(a[k].second);
        for (int l(0); l < 2; ++l) {
          pair<double, double> t = cross(a[k], b[l]);
          if (in(i, t.first, t.second) && in(j, t.first, -t.second))
            S.push_back(t);
        }
      }
      if (int((S).size()) == 0) continue;
      CH(S);
      S.push_back(S[0]);
      double area = 0;
      for (int i(0); i < int((S).size()) - 1; ++i)
        area += det(S[i].first, S[i].second, S[i + 1].first, S[i + 1].second);
      res -= fabs(area) * 0.5;
    }
  printf("%.12lf\n", res);
  return 0;
}