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 nn = 1100;
const double eps = 1e-17;
struct pp {
  double x, y, X, Y;
};
int n, top;
double h, f;
pp p[nn], q[nn], qq[nn];
bool cmp(pp x, pp y) { return x.x < y.x || x.x == y.x && x.y < y.y; }
void merge() {
  sort(p + 1, p + 1 + n, cmp);
  int cnt = 0;
  double x = -10000, y = -10000;
  for (int i = 1; i <= n; ++i) {
    if (p[i].x > y) {
      if (x > -10000) p[++cnt].x = x, p[cnt].y = y;
      x = p[i].x;
      y = p[i].y;
    } else
      y = max(y, p[i].y);
  }
  if (x > -10000) p[++cnt].x = x, p[cnt].y = y;
  n = cnt;
}
double calc(double x) { return (double)x * (h + f) / (f - h); }
void init() {
  scanf("%d%lf%lf", &n, &h, &f);
  for (int i = 1; i <= n; ++i) scanf("%lf%lf", &p[i].x, &p[i].y);
  merge();
  for (int i = 1; i <= n; ++i) p[i].X = calc(p[i].x), p[i].Y = calc(p[i].y);
}
void add(double x, double y, int &top) {
  q[++top].x = x;
  q[top].y = y;
}
void Add(pp x, pp y, double k, double b, int &top) {
  double u = (x.y - k * x.x - b) * 1.0 / (k * y.x + b - y.y);
  add((x.x + u * y.x) / (1 + u), (x.y + u * y.y) / (1 + u), top);
}
void cut(double k, double b, double opt) {
  q[0] = q[top];
  q[top + 1] = q[1];
  for (int i = 0; i <= top + 1; ++i) qq[i] = q[i];
  int t1 = 0;
  for (int i = 1; i <= top; ++i) {
    if ((qq[i].y - (k * qq[i].x + b)) * opt >= 0)
      q[++t1] = qq[i];
    else {
      if ((qq[i - 1].y - (k * qq[i - 1].x + b)) * opt >= 0) {
        Add(qq[i - 1], qq[i], k, b, t1);
      }
      if ((qq[i + 1].y - (k * qq[i + 1].x + b)) * opt >= 0) {
        Add(qq[i + 1], qq[i], k, b, t1);
      }
    }
  }
  top = t1;
}
double abss(double x) {
  if (x < 0) x = -x;
  return x;
}
double calc(pp x, pp y, pp z) {
  return abss((x.x - z.x) * (y.y - z.y) - (x.y - z.y) * (y.x - z.x)) / 2.0;
}
double getsum() {
  double res = 0;
  for (int i = 3; i <= top; ++i) res += calc(q[1], q[i - 1], q[i]);
  return res;
}
void work() {
  double ans = 0;
  for (int i = 1; i <= n; ++i)
    ans += (double)(p[i].Y - p[i].X + p[i].y - p[i].x) * h * 2;
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= n; ++j) {
      top = 0;
      add(p[i].x, h, top);
      add(p[i].y, h, top);
      add(p[i].Y, -h, top);
      add(p[i].X, -h, top);
      cut(2.0 * h / (p[j].X - p[j].x + eps),
          h - 2.0 * h / (p[j].X - p[j].x + eps) * p[j].X,
          2.0 * h / (p[j].X - p[j].x + eps) < 0 ? 1 : -1);
      cut(2.0 * h / (p[j].Y - p[j].y + eps),
          h - 2.0 * h / (p[j].Y - p[j].y + eps) * p[j].Y,
          2.0 * h / (p[j].Y - p[j].y + eps) < 0 ? -1 : 1);
      ans -= getsum();
    }
  }
  printf("%.9f\n", ans);
}
int main() {
  init();
  work();
  return 0;
}