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;
template <class T>
T abs(T x) {
  return x > 0 ? x : (-x);
}
template <class T>
T sqr(T x) {
  return x * x;
}
const double eps = 1E-8;
struct P {
  double x, y;
  P(double x = 0.0, double y = 0.0) : x(x), y(y) {}
  P operator+(P a) { return P(x + a.x, y + a.y); }
  P operator-(P a) { return P(x - a.x, y - a.y); }
  P operator*(double k) { return P(x * k, y * k); }
  double operator*(P a) { return x * a.y - y * a.x; }
  double operator^(P a) { return x * a.x + y * a.y; }
  double len() { return sqrt(x * x + y * y); }
  P perp() { return P(y, -x); }
  P norm() {
    double l = len();
    return abs(l) < eps ? P(x, y) : P(x / l, y / l);
  }
  bool operator==(P a) { return abs(x - a.x) < eps && abs(y - a.y) < eps; }
  void load() { cin >> x >> y; }
};
int sgn(double x) {
  if (x > eps) return 1;
  if (x < -eps) return -1;
  return 0;
}
bool pointOnSegment(P p, P a, P b) {
  if (abs((a - p) * (b - p)) > eps) return false;
  return ((a - p) ^ (b - p)) < eps;
}
bool crossSegments1d(double a, double aa, double b, double bb) {
  return min(a, aa) < max(b, bb) + eps && min(b, bb) < max(a, aa) + eps;
}
bool crossSegments(P a, P aa, P b, P bb) {
  if (sgn((b - a) * (aa - a)) * sgn((aa - a) * (bb - a)) < 0) return false;
  if (sgn((a - b) * (bb - b)) * sgn((bb - b) * (aa - b)) < 0) return false;
  return crossSegments1d(a.x, aa.x, b.x, bb.x) &&
         crossSegments1d(a.y, aa.y, b.y, bb.y);
}
struct L {
  double a, b, c;
  L(double a = 0.0, double b = 0.0, double c = 0.0) : a(a), b(b), c(c) {}
  bool operator||(L l) { return abs(a * l.b - b * l.a) < eps; }
};
L getLine(P p1, P p2) {
  double x0 = p1.x, y0 = p1.y;
  double al = (p2 - p1).x, be = (p2 - p1).y;
  return L(be, -al, al * y0 - be * x0);
}
P getPoint(L l1, L l2) {
  double det = l1.a * l2.b - l1.b * l2.a;
  double det1 = -(l1.c * l2.b - l1.b * l2.c);
  double det2 = -(l1.a * l2.c - l1.c * l2.a);
  return P(det1 / det, det2 / det);
}
double h, f;
pair<double, double> calc1(double y, double x1, double x2) {
  double l = x1 * (f - y) / (f - h);
  double r = x2 * (f - y) / (f - h);
  return make_pair(l, r);
}
pair<double, double> calc2(double y, double x1, double x2) {
  double l = x1 * (y + f) / (f - h);
  double r = x2 * (y + f) / (f - h);
  return make_pair(l, r);
}
int main() {
  int n;
  cin >> n;
  cin >> h >> f;
  vector<pair<int, int> > v(n);
  double res = 0.0;
  for (int i = 0; i < n; ++i) {
    scanf("%d%d", &v[i].first, &v[i].second);
    double l = abs(v[i].second - v[i].first);
    res += 2. * h * (l + l * (f + h) / (f - h));
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      vector<P> V;
      L l11 = getLine(P(0, f), P(v[i].first, h));
      L l12 = getLine(P(0, f), P(v[i].second, h));
      L l21 = getLine(P(0, -f), P(v[j].first, -h));
      L l22 = getLine(P(0, -f), P(v[j].second, -h));
      if (!(l11 || l21)) V.push_back(getPoint(l11, l21));
      if (!(l11 || l22)) V.push_back(getPoint(l11, l22));
      if (!(l12 || l21)) V.push_back(getPoint(l12, l21));
      if (!(l12 || l22)) V.push_back(getPoint(l12, l22));
      vector<double> ev;
      ev.push_back(-h);
      ev.push_back(-h);
      ev.push_back(h);
      ev.push_back(h);
      for (int k = 0; k < ((int)(V).size()); ++k) {
        if (abs(V[k].y) < h + eps) ev.push_back(V[k].y);
      }
      sort((ev).begin(), (ev).end());
      double cur = 0;
      double st = 0.0;
      for (int k = 1; k < ((int)(ev).size()); ++k) {
        pair<double, double> p = calc1(ev[k], v[i].first, v[i].second);
        pair<double, double> q = calc2(ev[k], v[j].first, v[j].second);
        double l = max(p.first, q.first);
        double r = min(p.second, q.second);
        double t = max(0.0, r - l);
        cur += (t + st) * 0.5 * (ev[k] - ev[k - 1]);
        st = t;
      }
      res -= abs(cur);
    }
  }
  printf("%.10lf\n", res);
  return 0;
}