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>
#pragma comment(linker, "/STACK:268435456")
using namespace std;
template <typename T>
T sqr(const T& x) {
  return x * x;
}
template <typename T>
T my_abs(const T& x) {
  return x < 0 ? -x : x;
}
const int INF = (int)1e9;
const long long LINF = (long long)6e18;
const long long INF64 = LINF;
const long long INFLL = LINF;
const long double EPS = 1e-7;
const long double PI = 3.1415926535897932384626433832795;
const long double ME = 1e-5;
const long long MOD = (int)1e9 + 7;
const long long MOD2 = (int)1e9 + 21;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, 1, 0, -1};
const int SQN = 500;
const int LOGN = 17;
const int N = (int)1e3 + 10;
struct line {
  long double A, B, C;
};
inline line get_line(const pair<long double, long double>& a,
                     const pair<long double, long double>& b) {
  line result;
  result.A = b.second - a.second;
  result.B = a.first - b.first;
  result.C = -result.A * a.first - result.B * a.second;
  return result;
}
inline pair<long double, long double> operator+(
    const pair<long double, long double>& a,
    const pair<long double, long double>& b) {
  return pair<long double, long double>(a.first + b.first, a.second + b.second);
}
inline pair<long double, long double> operator-(
    const pair<long double, long double>& a,
    const pair<long double, long double>& b) {
  return pair<long double, long double>(a.first - b.first, a.second - b.second);
}
inline pair<long double, long double> operator*(
    const pair<long double, long double>& a, long double k) {
  return pair<long double, long double>(a.first * k, a.second * k);
}
inline long double cp(const pair<long double, long double>& a,
                      const pair<long double, long double>& b) {
  return a.first * b.second - a.second * b.first;
}
inline bool intersect(const line& a, const line& b,
                      pair<long double, long double>& res) {
  long double d = cp(pair<long double, long double>(a.A, a.B),
                     pair<long double, long double>(b.A, b.B));
  if (abs(d) < EPS) {
    return false;
  }
  res.first = -cp(pair<long double, long double>(a.C, a.B),
                  pair<long double, long double>(b.C, b.B)) /
              d;
  res.second = -cp(pair<long double, long double>(a.A, a.C),
                   pair<long double, long double>(b.A, b.C)) /
               d;
  return true;
}
inline long double dist(const pair<long double, long double>& a,
                        const pair<long double, long double>& b) {
  return sqrt(sqr(a.first - b.first) + sqr(a.second - b.second));
}
inline bool equals(const pair<long double, long double>& a,
                   const pair<long double, long double>& b) {
  return dist(a, b) < EPS;
}
inline long double get_area(vector<pair<long double, long double> >& p) {
  if (int(p.size()) < 3) {
    return 0;
  }
  pair<long double, long double> c(0, 0);
  for (int i = 0; i < int(int(p.size())); ++i) {
    c = c + (p[i] * (1.0 / (long double)int(p.size())));
  }
  for (int i = 0; i < int(int(p.size())); ++i) {
    p[i] = p[i] - c;
  }
  vector<pair<long double, pair<long double, long double> > > pp;
  for (int i = 0; i < int(int(p.size())); ++i) {
    pp.push_back(make_pair((long double)atan2(p[i].second, p[i].first), p[i]));
  }
  sort(pp.begin(), pp.end());
  for (int i = 0; i < int(int(p.size())); ++i) {
    p[i] = pp[i].second;
  }
  p.erase(unique(p.begin(), p.end(), equals), p.end());
  long double res = 0;
  for (int i = 0; i < int(int(p.size())); ++i) {
    int j = (i + 1) % int(p.size());
    res += cp(p[i] - c, p[j] - c);
  }
  return abs(res) / 2.0;
}
vector<pair<long double, long double> > s;
long double ans = 0;
inline void solve() {
  int n;
  long double h, f;
  cin >> n >> h >> f;
  for (int i = 0; i < int(n); ++i) {
    int l, r;
    cin >> l >> r;
    if (l < 0 && r > 0) {
      s.push_back(pair<long double, long double>(l, 0));
      s.push_back(pair<long double, long double>(0, r));
    } else {
      s.push_back(pair<long double, long double>(l, r));
    }
  }
  pair<long double, long double> cu = pair<long double, long double>(0, f);
  pair<long double, long double> cd = pair<long double, long double>(0, -f);
  line ul = get_line(pair<long double, long double>(0, h),
                     pair<long double, long double>(1, h));
  line dl = get_line(pair<long double, long double>(0, -h),
                     pair<long double, long double>(1, -h));
  for (int i = 0; i < int(int(s.size())); ++i) {
    pair<long double, long double> lp =
        pair<long double, long double>(s[i].first, -h);
    pair<long double, long double> rp =
        pair<long double, long double>(s[i].second, -h);
    line l = get_line(cd, lp);
    line r = get_line(cd, rp);
    pair<long double, long double> ulp;
    intersect(l, ul, ulp);
    pair<long double, long double> urp;
    intersect(r, ul, urp);
    ans += h * (s[i].second - s[i].first + urp.first - ulp.first);
  }
  ans *= 2.0;
  for (int i = 0; i < int(int(s.size())); ++i) {
    for (int j = 0; j < int(i + 1); ++j) {
      vector<pair<long double, long double> > pts;
      pair<long double, long double> lp1 =
          pair<long double, long double>(s[i].first, -h);
      pair<long double, long double> rp1 =
          pair<long double, long double>(s[i].second, -h);
      line l1 = get_line(cd, lp1);
      line r1 = get_line(cd, rp1);
      pair<long double, long double> ulp1;
      intersect(l1, ul, ulp1);
      pair<long double, long double> urp1;
      intersect(r1, ul, urp1);
      pair<long double, long double> lp2 =
          pair<long double, long double>(s[j].first, h);
      pair<long double, long double> rp2 =
          pair<long double, long double>(s[j].second, h);
      line l2 = get_line(cu, lp2);
      line r2 = get_line(cu, rp2);
      pair<long double, long double> dlp2;
      intersect(l2, dl, dlp2);
      pair<long double, long double> drp2;
      intersect(r2, dl, drp2);
      if (ulp1.first >= lp2.first && ulp1.first <= rp2.first) {
        pts.push_back(ulp1);
      }
      if (urp1.first >= lp2.first && urp1.first <= rp2.first) {
        pts.push_back(urp1);
      }
      if (dlp2.first >= lp1.first && dlp2.first <= rp1.first) {
        pts.push_back(dlp2);
      }
      if (drp2.first >= lp1.first && drp2.first <= rp1.first) {
        pts.push_back(drp2);
      }
      if (lp2.first >= ulp1.first && lp2.first <= urp1.first) {
        pts.push_back(lp2);
      }
      if (rp2.first >= ulp1.first && rp2.first <= urp1.first) {
        pts.push_back(rp2);
      }
      if (lp1.first >= dlp2.first && lp1.first <= drp2.first) {
        pts.push_back(lp1);
      }
      if (rp1.first >= dlp2.first && rp1.first <= drp2.first) {
        pts.push_back(rp1);
      }
      pair<long double, long double> cll;
      if (intersect(l1, l2, cll) && cll.second >= -h && cll.second <= h) {
        pts.push_back(cll);
      }
      pair<long double, long double> clr;
      if (intersect(l1, r2, clr) && clr.second >= -h && clr.second <= h) {
        pts.push_back(clr);
      }
      pair<long double, long double> crl;
      if (intersect(r1, l2, crl) && crl.second >= -h && crl.second <= h) {
        pts.push_back(crl);
      }
      pair<long double, long double> crr;
      if (intersect(r1, r2, crr) && crr.second >= -h && crr.second <= h) {
        pts.push_back(crr);
      }
      if (i == j) {
        ans -= get_area(pts);
      } else {
        ans -= 2.0 * get_area(pts);
      }
    }
  }
  cout << ans << endl;
}
int main() {
  srand((unsigned int)time(NULL));
  cout << setprecision(15) << fixed;
  solve();
  cerr << "time: " << clock() << " ms" << endl;
  return 0;
}
