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:16777216")
using namespace std;
const double inf = 1e33;
const pair<double, double> pinf = make_pair(inf, inf);
const double eps = 1e-9;
const int DIM = 510;
int n, h, f;
int l[DIM], r[DIM];
vector<pair<pair<double, double>, pair<double, double> > > form(int nn) {
  vector<pair<pair<double, double>, pair<double, double> > > res;
  res.push_back(make_pair(make_pair(1.0 * l[nn], -1.0 * h),
                          make_pair(1.0 * r[nn], -1.0 * h)));
  double lt = 1.0 * l[nn] * (f + h) / (f - h);
  double rt = 1.0 * r[nn] * (f + h) / (f - h);
  res.push_back(make_pair(make_pair(l[nn], -h), make_pair(lt, h)));
  res.push_back(make_pair(make_pair(r[nn], -h), make_pair(rt, h)));
  res.push_back(make_pair(make_pair(lt, h), make_pair(rt, h)));
  return res;
}
pair<double, double> sub(pair<double, double> A, pair<double, double> B) {
  return make_pair(A.first - B.first, A.second - B.second);
}
double vect(pair<double, double> A, pair<double, double> B) {
  return A.first * B.second - A.second * B.first;
}
double getal(pair<double, double> A, pair<double, double> B,
             pair<double, double> C, pair<double, double> D) {
  pair<double, double> AB = sub(A, B);
  pair<double, double> DC = sub(D, C);
  pair<double, double> CB = sub(C, B);
  double zn = vect(AB, DC);
  if (abs(zn) > eps) {
    double ch = vect(CB, DC);
    double al = ch / zn;
    return al;
  }
  return inf;
}
pair<double, double> get(pair<pair<double, double>, pair<double, double> > L1,
                         pair<pair<double, double>, pair<double, double> > L2) {
  pair<double, double> P = pinf;
  pair<double, double> A = L1.first;
  pair<double, double> B = L1.second;
  pair<double, double> C = L2.first;
  pair<double, double> D = L2.second;
  pair<double, double> AB = sub(A, B);
  double al = getal(C, D, A, B);
  if (-eps < al && al < 1 + eps) {
    al = getal(A, B, C, D);
    if (-eps < al && al < 1 + eps) {
      P = make_pair(AB.first * al + B.first, AB.second * al + B.second);
    }
  }
  return P;
}
bool cw(pair<double, double> A, pair<double, double> B,
        pair<double, double> C) {
  return A.first * B.second - A.second * B.first -
             (A.first * C.second - A.second * C.first) + B.first * C.second -
             B.second * C.first <
         -eps;
}
bool ccw(pair<double, double> A, pair<double, double> B,
         pair<double, double> C) {
  return A.first * B.second - A.second * B.first -
             (A.first * C.second - A.second * C.first) + B.first * C.second -
             B.second * C.first >
         eps;
}
double get_plo(vector<pair<double, double> > v) {
  sort(v.begin(), v.end());
  vector<pair<double, double> > up, down;
  up.push_back(v[0]);
  for (int i = (1); i < ((int)(v.size())); i++)
    if (i == (int)(v.size()) - 1 || cw(up[0], v[i], v[(int)(v.size()) - 1])) {
      while ((int)(up.size()) >= 2 &&
             !cw(up[(int)(up.size()) - 2], up[(int)(up.size()) - 1], v[i]))
        up.pop_back();
      up.push_back(v[i]);
    }
  down.push_back(v[0]);
  for (int i = (1); i < ((int)(v.size())); i++)
    if (i == (int)(v.size()) - 1 ||
        ccw(down[0], v[i], v[(int)(v.size()) - 1])) {
      while ((int)(down.size()) >= 2 &&
             !ccw(down[(int)(down.size()) - 2], down[(int)(down.size()) - 1],
                  v[i]))
        down.pop_back();
      down.push_back(v[i]);
    }
  for (int i = (int)(down.size()) - 2; i >= 1; i--) up.push_back(down[i]);
  double res = 0.0;
  up.push_back(up[0]);
  for (int i = (0); i < ((int)(up.size()) - 1); i++) {
    res += vect(up[i], up[i + 1]) / 2;
  }
  res = abs(res);
  return res;
}
double inter(vector<pair<pair<double, double>, pair<double, double> > > v1,
             vector<pair<pair<double, double>, pair<double, double> > > v2) {
  double res = 0.0;
  vector<pair<double, double> > v;
  for (int i = (0); i < ((int)(v1.size())); i++) {
    for (int j = (0); j < ((int)(v2.size())); j++) {
      pair<double, double> P = get(v1[i], v2[j]);
      if (P != pinf) v.push_back(P);
    }
  }
  if ((int)(v.size()) > 2) {
    res += get_plo(v);
  }
  return res;
}
void trans(vector<pair<pair<double, double>, pair<double, double> > > &v) {
  for (int i = (0); i < ((int)(v.size())); i++) {
    v[i].first.second *= -1;
    v[i].second.second *= -1;
  }
}
void solve() {
  double s = 0.0;
  for (int i = (0); i < (n); i++) {
    double x = 1.0 * (r[i] - l[i]) * (f + h) / (f - h);
    double add = 1.0 * (r[i] - l[i] + x) * h;
    s += 2 * add;
  }
  for (int i = (0); i < (n); i++) {
    vector<pair<pair<double, double>, pair<double, double> > > v1 = form(i);
    trans(v1);
    for (int j = (0); j < (n); j++) {
      vector<pair<pair<double, double>, pair<double, double> > > v2 = form(j);
      s -= inter(v1, v2);
    }
  }
  printf("%.7lf\n", s);
}
int main() {
  scanf("%d%d%d", &n, &h, &f);
  for (int i = (0); i < (n); i++) {
    scanf("%d%d", &l[i], &r[i]);
  }
  solve();
  return 0;
}
