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>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
template <class T>
inline void checkmin(T &a, T b) {
  if (a > b) a = b;
}
template <class T>
inline void checkmax(T &a, T b) {
  if (a < b) a = b;
}
const int oo = 1 << 30;
const double eps = 1e-7;
const int N = 512;
const int M = 1;
const long long P = 10000000097ll;
int sgn(double x) { return (x > eps) - (x < -eps); }
int fcmp(double a, double b) { return sgn(a - b); }
double sqr(double x) { return x * x; }
struct Point {
  double x, y;
  Point() {}
  Point(double a, double b) : x(a), y(b) {}
  Point operator+(const Point &p) const { return Point(x + p.x, y + p.y); }
  Point operator-(const Point &p) const { return Point(x - p.x, y - p.y); }
  Point operator*(double d) const { return Point(x * d, y * d); }
  double operator*(const Point &p) const { return x * p.y - y * p.x; }
  Point operator/(double d) const { return Point(x / d, y / d); }
  double norm() const { return sqrt(x * x + y * y); }
  Point rot(double alpha) const {
    return Point(x * cos(alpha) - y * sin(alpha),
                 x * sin(alpha) + y * cos(alpha));
  }
  void cin() { scanf("%lf %lf", &x, &y); }
  void cout(char *s = "p = ") const { printf("%s %f %f", s, x, y); }
};
struct Line {
  Point a, b;
  Line() {}
  Line(const Point &p, const Point &q) : a(p), b(q) {}
  bool para(const Line &lin) const {
    Point u, v;
    u = b - a;
    v = lin.b - lin.a;
    return sgn(u * v) == 0;
  }
  bool l_to_s(const Line &seg) const {
    return sgn((b - a) * (seg.a - a)) * sgn((b - a) * (seg.b - a)) < 0;
  }
  bool s_to_s(const Line &seg) const {
    return l_to_s(seg) && seg.l_to_s(*this);
  }
  Point l_on_l(const Line &lin) const {
    double s1, s2;
    s1 = (lin.a - a) * (lin.b - a);
    s2 = (lin.b - b) * (lin.a - b);
    return (a * s2 + b * s1) / (s1 + s2);
  }
  int l_to_p(const Point &p) const { return sgn((b - a) * (p - a)); }
};
Point ar[N][5];
Point br[N][5];
Point tmple[2][N];
Point *x, *y;
double h, f;
int n;
double ans;
double area(Point *p, int pn) {
  int i, j, k;
  double ans = 0;
  for (i = 1; i < pn; i++) ans += (p[i] - p[0]) * (p[i + 1] - p[0]);
  if (pn < -11) {
    for (i = 0; i < (pn); i++) printf("%.3f %.3f--> ", p[i].x, p[i].y);
    puts("");
  }
  return ans;
}
void read() {
  int i, j, k;
  double a, b;
  double fix, low;
  ans = 0;
  scanf("%d", &n);
  scanf("%lf %lf", &h, &f);
  fix = f / (f - h);
  low = (f + h) / (f - h);
  for (i = 0; i < (n); i++) {
    scanf("%lf %lf", &a, &b);
    ar[i][0] = Point(a * fix, 0);
    ar[i][1] = Point(b * fix, 0);
    ar[i][2] = Point(b, h);
    ar[i][3] = Point(a, h);
    ar[i][4] = ar[i][0];
    br[i][0] = Point(a * fix, 0);
    br[i][1] = Point(b * fix, 0);
    br[i][2] = Point(b * low, h);
    br[i][3] = Point(a * low, h);
    br[i][4] = br[i][0];
    ans += area(ar[i], 4) + area(br[i], 4);
  }
}
void cut(Point *p) {
  int xn, yn;
  int i, j, k;
  int ii, jj;
  Line lin, seg;
  for (i = 0; i < (n); i++) {
    for (j = 0; j < (5); j++) x[j] = p[j];
    xn = 4;
    for (j = 0; j < (4); j++) {
      lin = Line(ar[i][j], ar[i][j + 1]);
      yn = 0;
      for (ii = 1; ii <= xn; ii++) {
        seg = Line(x[ii - 1], x[ii]);
        if (lin.l_to_s(seg)) y[yn++] = lin.l_on_l(seg);
        if (lin.l_to_p(x[ii]) >= 0) y[yn++] = x[ii];
      }
      y[yn] = y[0];
      swap(x, y);
      swap(xn, yn);
    }
    ans -= area(x, xn);
  }
}
void sub() {
  int i, j, k;
  x = tmple[0];
  y = tmple[1];
  for (i = 0; i < (n); i++) cut(br[i]);
}
int main() {
  int T, _ = 0;
  read();
  sub();
  printf("%.6f\n", ans);
  return 0;
}