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;
double EPS = 1e-8;
struct POINT {
  double x;
  double y;
};
POINT intersect(POINT p0, POINT p1, POINT P0, POINT P1) {
  double x = p0.x - p1.x;
  double y = p0.y - p1.y;
  double X = P0.x - P1.x;
  double Y = P0.y - P1.y;
  POINT res;
  res.x = 1 << 30;
  res.y = 1 << 30;
  res.x =
      (x * X * (p0.y - P0.y) + x * Y * P0.x - X * y * p0.x) / (x * Y - X * y);
  res.y =
      (y * Y * (p0.x - P0.x) + y * X * P0.y - Y * x * p0.y) / (X * y - x * Y);
  return res;
}
double area(POINT p0, POINT p1, POINT p2) {
  p1.x -= p0.x;
  p1.y -= p0.y;
  p2.x -= p0.x;
  p2.y -= p0.y;
  return abs(p1.x * p2.y - p1.y * p2.x) / 2.0;
}
set<pair<double, double> > points[2];
long long n;
double res;
double h, f;
double l, r;
int main() {
  res = 0;
  cin >> n >> h >> f;
  for (long long i = 0; i < ((long long)n); i++) {
    cin >> l >> r;
    if (l * r < 0) {
      points[0].insert(make_pair(0, -l));
      points[1].insert(make_pair(0, r));
    } else if (r <= 0) {
      points[0].insert(make_pair(-r, -l));
    } else {
      points[1].insert(make_pair(l, r));
    }
  }
  POINT uf, df, uh0, uh1, dh0, dh1;
  uf.x = df.x = uh0.x = dh0.x = 0;
  uh1.x = dh1.x = 1;
  uf.y = f;
  df.y = -f;
  uh0.y = uh1.y = h;
  dh0.y = dh1.y = -h;
  for (long long i = 0; i < ((long long)2); i++) {
    set<pair<double, double> >::iterator it, sub;
    for (it = points[i].begin(); it != points[i].end(); it++) {
      if (it->first == 0) {
        POINT dp, up;
        dp.x = it->second;
        dp.y = -h;
        up.x = it->second;
        up.y = h;
        POINT upper_inter = intersect(uh0, uh1, dp, df);
        POINT middle_inter = intersect(dp, df, up, uf);
        res += h * (upper_inter.x + middle_inter.x);
      } else {
        POINT a, b, c, d;
        POINT left, right, left2, right2;
        left.x = left2.x = it->first;
        right.x = right2.x = it->second;
        left.y = right.y = -h;
        left2.y = right2.y = h;
        a = intersect(left, df, left2, uf);
        b = intersect(right, df, left2, uf);
        c = intersect(right, df, right2, uf);
        d = intersect(left, df, right2, uf);
        res -= area(a, b, c);
        res -= area(a, c, d);
        POINT LEFT, RIGHT;
        LEFT = intersect(uh0, uh1, left, df);
        RIGHT = intersect(uh0, uh1, right, df);
        res -= area(df, left, right) * 2;
        res += area(df, LEFT, RIGHT) * 2;
        if (LEFT.x < right2.x) {
          res += area(d, LEFT, right2) * 2;
        }
      }
      for (sub = points[i].begin(); sub != it; sub++) {
        POINT a, b, c, d;
        POINT left, right, LEFT, RIGHT;
        left.x = it->first;
        right.x = it->second;
        left.y = right.y = -h;
        LEFT.y = RIGHT.y = h;
        LEFT.x = sub->first;
        RIGHT.x = sub->second;
        a = intersect(left, df, RIGHT, uf);
        b = intersect(left, df, LEFT, uf);
        c = intersect(right, df, LEFT, uf);
        d = intersect(right, df, RIGHT, uf);
        if (a.y < -h) {
          continue;
        } else {
          POINT L, R;
          L = intersect(dh0, dh1, uf, LEFT);
          R = intersect(dh0, dh1, uf, RIGHT);
          if (b.y > -h) {
            res += 2 * area(left, b, L);
          }
          if (c.y > -h) {
            res += 2 * area(c, d, R);
            res += 2 * area(c, L, R);
          } else if (d.y > -h) {
            res += 2 * area(right, d, R);
          }
          res -= 2 * area(left, a, R);
        }
      }
    }
  }
  cout << res << endl;
}