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;
vector<pair<pair<double, double>, pair<double, double> > > ti1, ti2;
vector<pair<double, double> > ct;
int n;
double h, f, lc, rc, ld, rd, k1, b1, ans;
void pit(pair<double, double> a1, pair<double, double> a2) {
  double k1, b1, k2, b2, xc, yc;
  if ((a1.first <= a2.first) && (a1.second <= a2.second)) return;
  if ((a1.first >= a2.first) && (a1.second >= a2.second)) return;
  if (a2.first == a2.second) swap(a1, a2);
  if (a1.first == a1.second) {
    k1 = (2 * h) / (a2.first - a2.second);
    b1 = h - a2.first * k1;
    ct.push_back(make_pair(a1.first, k1 * a1.first + b1));
  } else {
    k1 = (2 * h) / (a1.first - a1.second);
    b1 = h - a1.first * k1;
    k2 = (2 * h) / (a2.first - a2.second);
    b2 = h - a2.first * k2;
    xc = (b2 - b1) / (k1 - k2);
    yc = xc * k2 + b2;
    ct.push_back(make_pair(xc, yc));
  }
}
void louit(double l1, double r1, double l2, double r2, double h) {
  if (l1 > l2) {
    swap(l1, l2);
    swap(r1, r2);
  }
  if (r1 < l2) return;
  if ((r1 >= l2) && (r1 < r2)) {
    ct.push_back(make_pair(l2, h));
    ct.push_back(make_pair(r1, h));
  }
  if (r1 >= r2) {
    ct.push_back(make_pair(l2, h));
    ct.push_back(make_pair(r2, h));
  }
}
double cross(pair<double, double> a1, pair<double, double> a2,
             pair<double, double> a3) {
  double s = (a2.first - a1.first) * (a3.second - a1.second) -
             (a2.second - a1.second) * (a3.first - a1.first);
  return s;
}
bool cmp(pair<double, double> a1, pair<double, double> a2) {
  return cross(ct[0], a1, a2) > 0;
}
double getarea() {
  if (ct.size() == 0) return 0;
  int ml;
  bool flag = true;
  double ans = 0;
  while (flag) {
    flag = false;
    for (int i = 0; i < ct.size(); i++) {
      for (int j = i + 1; j < ct.size(); j++)
        if (ct[i] == ct[j]) {
          flag = true;
          break;
        }
      if (flag) {
        ct.erase(ct.begin() + i);
        break;
      }
    }
  }
  pair<double, double> d = ct[0];
  ml = 0;
  for (int i = 1; i < ct.size(); i++)
    if ((ct[i].first > d.first) ||
        ((ct[i].first == d.first) && (ct[i].second > d.second)))
      d = ct[i], ml = i;
  swap(ct[0], ct[ml]);
  sort(ct.begin() + 1, ct.end(), cmp);
  ct.push_back(ct[0]);
  for (int i = 1; i < ct.size(); i++) ans += cross(ct[0], ct[i - 1], ct[i]);
  return abs(ans / 2);
}
double jiao(pair<pair<double, double>, pair<double, double> > a1,
            pair<pair<double, double>, pair<double, double> > a2) {
  double l1, r1, l2, r2;
  ct.clear();
  pit(a1.first, a2.first);
  pit(a1.second, a2.first);
  pit(a1.first, a2.second);
  pit(a1.second, a2.second);
  l1 = a1.first.first;
  r1 = a1.second.first;
  l2 = a2.first.first;
  r2 = a2.second.first;
  louit(l1, r1, l2, r2, h);
  l1 = a1.first.second;
  r1 = a1.second.second;
  l2 = a2.first.second;
  r2 = a2.second.second;
  louit(l1, r1, l2, r2, -h);
  return getarea();
}
int main() {
  cin >> n >> h >> f;
  for (int i = 1; i <= n; i++) {
    cin >> lc >> rc;
    if (lc == 0)
      ld = 0;
    else {
      k1 = (h - f) / lc;
      b1 = f;
      ld = (-h - b1) / k1;
    }
    if (rc == 0)
      rd = 0;
    else {
      k1 = (h - f) / rc;
      b1 = f;
      rd = (-h - b1) / k1;
    }
    ti1.push_back(make_pair(make_pair(lc, ld), make_pair(rc, rd)));
    ti2.push_back(make_pair(make_pair(ld, lc), make_pair(rd, rc)));
  }
  ans = 0;
  for (int i = 0; i < ti1.size(); i++)
    ans += 2 *
           (ti1[i].second.first - ti1[i].first.first + ti1[i].second.second -
            ti1[i].first.second) *
           h;
  for (int i = 0; i < ti1.size(); i++)
    for (int j = 0; j < ti2.size(); j++) ans -= jiao(ti1[i], ti2[j]);
  printf("%.10lf\n", ans);
  return 0;
}
