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;
int n;
double h, f;
const double EPS = 1e-8;
double cross(const complex<double>& a, const complex<double>& b) {
  return imag(conj(a) * b);
}
double dot(const complex<double>& a, const complex<double>& b) {
  return real(conj(a) * b);
}
int ccw(complex<double> a, complex<double> b, complex<double> c) {
  b -= a;
  c -= a;
  if (cross(b, c) > 0) return +1;
  if (cross(b, c) < 0) return -1;
  if (dot(b, c) < 0) return +2;
  if (norm(b) < norm(c)) return -2;
  return 0;
}
enum { OUT, ON, IN };
int convex_contains(const vector<complex<double> >& P,
                    const complex<double>& p) {
  const int n = P.size();
  complex<double> g = (P[0] + P[n / 3] + P[2 * n / 3]) / 3.0;
  int a = 0, b = n;
  while (a + 1 < b) {
    int c = (a + b) / 2;
    if (cross(P[a] - g, P[c] - g) > 0) {
      if (cross(P[a] - g, p - g) > 0 && cross(P[c] - g, p - g) < 0)
        b = c;
      else
        a = c;
    } else {
      if (cross(P[a] - g, p - g) < 0 && cross(P[c] - g, p - g) > 0)
        a = c;
      else
        b = c;
    }
  }
  b %= n;
  if (cross(P[a] - p, P[b] - p) < 0) return 0;
  if (cross(P[a] - p, P[b] - p) > 0) return 2;
  return 1;
}
bool intersect_1pt(const complex<double>& a, const complex<double>& b,
                   const complex<double>& c, const complex<double>& d,
                   complex<double>& r) {
  double D = cross(b - a, d - c);
  if (-EPS < D && D < EPS) return false;
  double t = cross(c - a, d - c) / D;
  double s = -cross(a - c, b - a) / D;
  r = a + t * (b - a);
  return t >= 0 && t <= 1 && s >= 0 && s <= 1;
}
vector<complex<double> > convex_intersect(const vector<complex<double> >& P,
                                          const vector<complex<double> >& Q) {
  const int n = P.size(), m = Q.size();
  int a = 0, b = 0, aa = 0, ba = 0;
  enum { Pin, Qin, Unknown } in = Unknown;
  vector<complex<double> > R;
  do {
    int a1 = (a + n - 1) % n, b1 = (b + m - 1) % m;
    double C = cross(P[a] - P[a1], Q[b] - Q[b1]);
    double A = cross(P[a1] - Q[b], P[a] - Q[b]);
    double B = cross(Q[b1] - P[a], Q[b] - P[a]);
    complex<double> r;
    if (intersect_1pt(P[a1], P[a], Q[b1], Q[b], r)) {
      if (in == Unknown) aa = ba = 0;
      R.push_back(r);
      in = B > 0 ? Pin : A > 0 ? Qin : in;
    }
    if (C == 0 && B == 0 && A == 0) {
      if (in == Pin) {
        b = (b + 1) % m;
        ++ba;
      } else {
        a = (a + 1) % m;
        ++aa;
      }
    } else if (C >= 0) {
      if (A > 0) {
        if (in == Pin) R.push_back(P[a]);
        a = (a + 1) % n;
        ++aa;
      } else {
        if (in == Qin) R.push_back(Q[b]);
        b = (b + 1) % m;
        ++ba;
      }
    } else {
      if (B > 0) {
        if (in == Qin) R.push_back(Q[b]);
        b = (b + 1) % m;
        ++ba;
      } else {
        if (in == Pin) R.push_back(P[a]);
        a = (a + 1) % n;
        ++aa;
      }
    }
  } while ((aa < n || ba < m) && aa < 2 * n && ba < 2 * m);
  if (in == Unknown) {
    if (convex_contains(Q, P[0])) return P;
    if (convex_contains(P, Q[0])) return Q;
  }
  return R;
}
double area(const vector<complex<double> >& P) {
  double A = 0;
  for (int i = 0; i < P.size(); ++i) A += cross(P[i], P[(i + 1) % P.size()]);
  return A / 2;
}
struct daikei {
  double ux1, ux2;
  double dx1, dx2;
  daikei(double a, double b, double c, double d)
      : ux1(a), ux2(b), dx1(c), dx2(d) {}
};
double intersect(const daikei& a, const daikei& b) {
  vector<complex<double> > P, Q;
  P.push_back(complex<double>(a.ux2, h));
  P.push_back(complex<double>(a.ux1, h));
  P.push_back(complex<double>(a.dx1, -h));
  P.push_back(complex<double>(a.dx2, -h));
  Q.push_back(complex<double>(b.ux2, h));
  Q.push_back(complex<double>(b.ux1, h));
  Q.push_back(complex<double>(b.dx1, -h));
  Q.push_back(complex<double>(b.dx2, -h));
  return area(convex_intersect(P, Q));
}
int main() {
  scanf("%d%lf%lf", &n, &h, &f);
  vector<daikei> ue, st;
  for (int i = 0; i < n; ++i) {
    double l, r;
    scanf("%lf%lf", &l, &r);
    ue.push_back(daikei(l, r, l * (f + h) / (f - h), r * (f + h) / (f - h)));
    st.push_back(daikei(l * (f + h) / (f - h), r * (f + h) / (f - h), l, r));
  }
  double area = 0;
  for (int i = 0; i < n; ++i) {
    area += (ue[i].ux2 - ue[i].ux1 + ue[i].dx2 - ue[i].dx1) * h;
    area += (st[i].ux2 - st[i].ux1 + st[i].dx2 - st[i].dx1) * h;
  }
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j) area -= intersect(ue[i], st[j]);
  printf("%.9f\n", area);
  return 0;
}