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;
long long fpm(long long b, long long e, long long m) {
  long long t = 1;
  for (; e; e >>= 1, b = b * b % m) e & 1 ? t = t * b % m : 0;
  return t;
}
template <class T>
inline bool chkmin(T &a, T b) {
  return a > b ? a = b, true : false;
}
template <class T>
inline bool chkmax(T &a, T b) {
  return a < b ? a = b, true : false;
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
template <class edge>
struct Graph {
  vector<vector<edge> > adj;
  Graph(int n) {
    adj.clear();
    adj.resize(n + 5);
  }
  Graph() { adj.clear(); }
  void resize(int n) { adj.resize(n + 5); }
  void adde(int s, edge e) { adj[s].push_back(e); }
  void del(int s, edge e) {
    adj[s].erase(find((adj[s]).begin(), (adj[s]).end(), e));
  }
  int deg(int v) { return adj[v].size(); }
  vector<edge> &operator[](int t) { return adj[t]; }
};
const int maxn = 550;
long double rate, f, h;
long double L[maxn], R[maxn];
long double area(vector<pair<long double, long double> > &poly) {
  long double ret = 0;
  int n = (int)((poly).size());
  for (int i = 0; i < n; ++i)
    ret += poly[i].first * poly[(i + 1) % n].second -
           poly[i].second * poly[(i + 1) % n].first;
  return fabs(ret) / 2;
}
pair<long double, long double> crd(long double u, long double b) {
  long double x = f / (f - h) * 2 / (1 / u + 1 / b), y = f * (u - b) / (u + b);
  return make_pair(x, y);
}
long double cap(int x, int y) {
  vector<pair<long double, long double> > poly;
  double Lxr = L[x] * rate, Lyr = L[y] * rate, Rxr = R[x] * rate,
         Ryr = R[y] * rate;
  if (L[x] < Lyr && L[y] < Lxr) poly.push_back(crd(L[x], L[y]));
  if (Lyr <= L[x] && L[x] <= Ryr) poly.push_back(make_pair(L[x], +h));
  if (L[x] <= Lyr && Lyr <= R[x]) poly.push_back(make_pair(Lyr, +h));
  if (L[x] <= Ryr && Ryr <= R[x]) poly.push_back(make_pair(Ryr, +h));
  if (Lyr <= R[x] && R[x] <= Ryr) poly.push_back(make_pair(R[x], +h));
  if (R[x] < Lyr && L[y] < Rxr) poly.push_back(crd(R[x], L[y]));
  if (R[x] < Ryr && R[y] < Rxr) poly.push_back(crd(R[x], R[y]));
  if (Rxr >= R[y] && R[y] >= Lxr) poly.push_back(make_pair(R[y], -h));
  if (R[y] >= Rxr && Rxr >= L[y]) poly.push_back(make_pair(Rxr, -h));
  if (R[y] >= Lxr && Lxr >= L[y]) poly.push_back(make_pair(Lxr, -h));
  if (Rxr >= L[y] && L[y] >= Lxr) poly.push_back(make_pair(L[y], -h));
  if (L[x] < Ryr && R[y] < Lxr) poly.push_back(crd(L[x], R[y]));
  return area(poly);
}
long double calc(vector<pair<long double, long double> > &pt) {
  int n = pt.size();
  long double ret = 0;
  for (int i = 0; i < n; ++i) L[i] = pt[i].first, R[i] = pt[i].second;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j) ret += cap(i, j);
  return ret;
}
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  long double ans = 0;
  vector<pair<long double, long double> > neg, pos;
  cin >> n >> h >> f;
  rate = (f + h) / (f - h);
  for (int i = 1, l, r; i <= n; ++i) {
    cin >> l >> r;
    if (r <= 0) neg.push_back(make_pair(-r, -l));
    if (l >= 0) pos.push_back(make_pair(+l, +r));
    if (l < 0 && 0 < r)
      neg.push_back(make_pair(0, -l)), pos.push_back(make_pair(0, +r));
    ans += (r - l) * (rate + 1) * h * 2;
  }
  cout << setprecision(15) << ans - calc(neg) - calc(pos) << endl;
  return 0;
}