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 N = 500 + 5;
const double ERR = 1e-13;
int n;
int top[N];
bool cur;
double ans;
double h, H;
double l[N], r[N];
struct Point {
  double x, y;
  Point() {}
  Point(double x, double y) : x(x), y(y) {}
  Point operator-(Point a) { return Point(x - a.x, y - a.y); }
  Point operator+(Point a) { return Point(x + a.x, y + a.y); }
  Point operator*(double a) { return Point(x * a, y * a); }
} f[2][N];
struct Func {
  double k, b;
  Func() {}
  Func(double k, double b) : k(k), b(b) {}
};
inline int Dcmp(double x) {
  if (fabs(x) < ERR) return 0;
  return x > ERR ? 1 : -1;
}
inline double Cross(Point a, Point b) { return a.x * b.y - b.x * a.y; }
inline Point X(Point P, Point v, Point Q, Point w) {
  Point u = P - Q;
  double t = Cross(w, u) / Cross(v, w);
  return P + (v * t);
}
inline Func Get_function(Point st, Point ed) {
  double k = (st.y - ed.y) / (st.x - ed.x);
  double b = st.y - k * st.x;
  return Func(k, b);
}
inline void Special(int c) {
  top[cur ^= 1] = 0;
  memset(f[cur], 0, sizeof(f[cur]));
  for (int i = 1; i <= top[cur ^ 1]; i++) {
    if (Dcmp(f[cur ^ 1][i].x) * c >= 0) f[cur][++top[cur]] = f[cur ^ 1][i];
    int j = i % top[cur ^ 1] + 1;
    Point st = f[cur ^ 1][i];
    Point ed = f[cur ^ 1][j];
    if (Dcmp(st.x * ed.x) < 0)
      f[cur][++top[cur]] = X(Point(0, 0), Point(0, 1000), st, ed - st);
  }
}
inline void Half_space(double k, double b, Point yst, Point yed, int c) {
  top[cur ^= 1] = 0;
  memset(f[cur], 0, sizeof(f[cur]));
  for (int i = 1; i <= top[cur ^ 1]; i++) {
    if (Dcmp(k * f[cur ^ 1][i].x + b - f[cur ^ 1][i].y) * c >= 0)
      f[cur][++top[cur]] = f[cur ^ 1][i];
    int j = i % top[cur ^ 1] + 1;
    Point st = f[cur ^ 1][i];
    Point ed = f[cur ^ 1][j];
    if (Dcmp((k * st.x + b - st.y) * (k * ed.x + b - ed.y)) < 0)
      f[cur][++top[cur]] = X(st, ed - st, yst, yed - yst);
  }
}
inline double Hull(Point *p, int s) {
  double sum = 0;
  Point st = p[1];
  for (int i = 2; i < s; i++) sum += Cross(p[i] - st, p[i + 1] - st);
  return fabs(sum / 2);
}
int main() {
  scanf("%d %lf %lf", &n, &h, &H);
  for (int i = 1; i <= n; i++) {
    scanf("%lf %lf", &l[i], &r[i]);
    ans +=
        ((r[i] - l[i]) * (H + h) / (H - h)) * (H + h) - (r[i] - l[i]) * (H - h);
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) {
      top[cur] = 4;
      f[cur][1] = Point(-100000, h);
      f[cur][2] = Point(100000, h);
      f[cur][3] = Point(100000, -h);
      f[cur][4] = Point(-100000, -h);
      if (!Dcmp(l[i]))
        Special(1);
      else {
        Point st = Point(0, H);
        Point ed = Point(l[i], h);
        Func fc = Get_function(st, ed);
        Half_space(fc.k, fc.b, st, ed, -Dcmp(l[i]));
      }
      if (!Dcmp(r[i]))
        Special(-1);
      else {
        Point st = Point(0, H);
        Point ed = Point(r[i], h);
        Func fc = Get_function(st, ed);
        Half_space(fc.k, fc.b, st, ed, Dcmp(r[i]));
      }
      if (!Dcmp(l[j]))
        Special(1);
      else {
        Point st = Point(0, -H);
        Point ed = Point(l[j], -h);
        Func fc = Get_function(st, ed);
        Half_space(fc.k, fc.b, st, ed, Dcmp(l[j]));
      }
      if (!Dcmp(r[j]))
        Special(-1);
      else {
        Point st = Point(0, -H);
        Point ed = Point(r[j], -h);
        Func fc = Get_function(st, ed);
        Half_space(fc.k, fc.b, st, ed, -Dcmp(r[j]));
      }
      ans -= Hull(f[cur], top[cur]);
    }
  printf("%.4lf\n", ans);
  return 0;
}