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;
const int maxn = 1000 + 10;
const double eps = 1e-7;
double x1[maxn], x2[maxn], x3[maxn], x4[maxn];
pair<pair<double, double>, pair<double, double> > p[maxn];
double key[maxn];
int n, h, f;
double res = 0;
double cross(double x1, double x2, double x3, double x4) {
  if ((x3 - eps <= x1 && x4 - eps <= x2) || (x3 + eps >= x1 && x4 + eps >= x2))
    return 1e10;
  if (fabs(x1 - x2) <= eps || fabs(x3 - x4) <= eps) return 1e10;
  double k1 = 2 * h / (x1 - x2), k2 = 2 * h / (x3 - x4);
  double b1 = h - x1 * k1, b2 = h - x3 * k2;
  return (b2 - b1) / (k1 - k2);
}
void process(int a, double xl, double xr, pair<double, double> &L,
             pair<double, double> &R) {
  if (xl + eps < x1[a])
    R.first = (xl - x3[a]) * 2 * h / (x1[a] - x3[a]) - h;
  else if (xl - eps <= x2[a])
    R.first = h;
  else
    R.first = (x4[a] - xl) * 2 * h / (x4[a] - x2[a]) - h;
  if (xr + eps < x1[a])
    R.second = (xr - x3[a]) * 2 * h / (x1[a] - x3[a]) - h;
  else if (xr - eps <= x2[a])
    R.second = h;
  else
    R.second = (x4[a] - xr) * 2 * h / (x4[a] - x2[a]) - h;
  if (xl + eps < x3[a])
    L.first = -(xl - x1[a]) * 2 * h / (x3[a] - x1[a]) + h;
  else if (xl - eps <= x4[a])
    L.first = -h;
  else
    L.first = -(x2[a] - xl) * 2 * h / (x2[a] - x4[a]) + h;
  if (xr + eps < x3[a])
    L.second = -(xr - x1[a]) * 2 * h / (x3[a] - x1[a]) + h;
  else if (xr - eps <= x4[a])
    L.second = -h;
  else
    L.second = -(x2[a] - xr) * 2 * h / (x2[a] - x4[a]) + h;
}
double calc(int a, int b) {
  int n = 0;
  key[n++] = x1[a];
  key[n++] = x2[a];
  key[n++] = x3[a];
  key[n++] = x4[a];
  key[n++] = x1[b];
  key[n++] = x2[b];
  key[n++] = x3[b];
  key[n++] = x4[b];
  key[n++] = cross(x1[a], x3[a], x1[b], x3[b]);
  key[n++] = cross(x1[a], x3[a], x2[b], x4[b]);
  key[n++] = cross(x2[a], x4[a], x1[b], x3[b]);
  key[n++] = cross(x2[a], x4[a], x2[b], x4[b]);
  sort(key, key + n);
  double res = 0;
  for (int i = 0; i + 1 < n && key[i + 1] < 1e8; i++)
    if (key[i + 1] - key[i] > eps) {
      pair<double, double> L = make_pair(-h, -h), R = make_pair(h, h);
      pair<double, double> LL, RR;
      process(a, key[i], key[i + 1], LL, RR);
      if (LL.first + LL.second > L.first + L.second) L = LL;
      if (RR.first + RR.second < R.first + R.second) R = RR;
      process(b, key[i], key[i + 1], LL, RR);
      if (LL.first + LL.second > L.first + L.second) L = LL;
      if (RR.first + RR.second < R.first + R.first) R = RR;
      if (L.first + L.second < R.first + R.second)
        res += (R.first - L.first + R.second - L.second) *
               (key[i + 1] - key[i]) / 2.0;
    }
  return res;
}
int main() {
  scanf("%d%d%d", &n, &h, &f);
  for (int i = 0; i < n; i++) {
    double a, b;
    scanf("%lf%lf", &a, &b);
    x1[i] = a;
    x2[i] = b;
    x3[i] = a * (f + h) / (f - h);
    x4[i] = b * (f + h) / (f - h);
    x3[i + n] = a;
    x4[i + n] = b;
    x1[i + n] = x3[i];
    x2[i + n] = x4[i];
    res += (x2[i] - x1[i] + x4[i] - x3[i]) * h * 2;
  }
  for (int i = 0; i < n; i++)
    for (int j = n; j < n + n; j++) res -= calc(i, j);
  printf("%0.9lf\n", res);
}