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 double pi = acos(-1.0);
const double eps = 1e-8;
int sgn(double x) { return x < -eps ? -1 : x > eps; }
struct point {
  double x, y;
  point() : x(0), y(0) {}
  point(double a, double b) : x(a), y(b) {}
  point operator+(const point &b) const { return point(x + b.x, y + b.y); }
  point operator-(const point &b) const { return point(x - b.x, y - b.y); }
  point operator*(const double &b) const { return point(x * b, y * b); }
  point operator/(const double &b) const { return point(x / b, y / b); }
  bool operator==(const point &b) const {
    return (sgn(y - b.y) == 0 && sgn(x - b.x) == 0);
  }
  double operator*(const point &b) const { return x * b.x + y * b.y; }
  double X(const point &b) const { return x * b.y - y * b.x; }
  point rot(const double &ta) const {
    return point(cos(ta) * x - sin(ta) * y, sin(ta) * x + cos(ta) * y);
  }
  point rot90(const double &d) const { return point(-y, x) / len() * d; }
  double dis(const point &b) const {
    return sqrt(fabs((x - b.x) * (x - b.x) + (y - b.y) * (y - b.y)));
  }
  double len() const { return sqrt(x * x + y * y); }
};
struct polygon {
  point p[20];
  int n;
};
struct line {
  double a, b, c;
};
line linefromsegment(point p1, point p2) {
  line tmp;
  tmp.a = p2.y - p1.y;
  tmp.b = p1.x - p2.x;
  tmp.c = p2.x * p1.y - p1.x * p2.y;
  return tmp;
}
point lineinter(line l1, line l2) {
  point tmp;
  double a1 = l1.a, b1 = l1.b, c1 = l1.c, a2 = l2.a, b2 = l2.b, c2 = l2.c;
  if (sgn(b1) == 0) {
    tmp.x = -c1 / a1;
    tmp.y = (-c2 - a2 * tmp.x) / b2;
  } else {
    tmp.x = (c1 * b2 - b1 * c2) / (b1 * a2 - b2 * a1);
    tmp.y = (-c1 - a1 * tmp.x) / b1;
  }
  return tmp;
}
void cut_polygon(point p1, point p2, polygon &p) {
  p.p[p.n] = p.p[0];
  polygon new_polygon;
  point interp;
  line l1, l2;
  double t1, t2;
  new_polygon.n = 0;
  for (int i = 0; i < p.n; i++) {
    t1 = (p2 - p1).X(p.p[i] - p1);
    t2 = (p2 - p1).X(p.p[i + 1] - p1);
    if (sgn(t1) == 0) {
      new_polygon.p[new_polygon.n++] = p.p[i];
      if (sgn(t2) <= 0) new_polygon.p[new_polygon.n++] = p.p[i + 1];
    } else if (sgn(t2) == 0) {
      if (t1 < 0) new_polygon.p[new_polygon.n++] = p.p[i];
      new_polygon.p[new_polygon.n++] = p.p[i + 1];
    } else if (t1 < 0 && t2 < 0) {
      new_polygon.p[new_polygon.n++] = p.p[i];
      new_polygon.p[new_polygon.n++] = p.p[i + 1];
    } else if (t1 * t2 < 0) {
      l1 = linefromsegment(p1, p2);
      l2 = linefromsegment(p.p[i], p.p[i + 1]);
      interp = lineinter(l1, l2);
      if (t1 < 0) {
        new_polygon.p[new_polygon.n++] = p.p[i];
        new_polygon.p[new_polygon.n++] = interp;
      } else {
        new_polygon.p[new_polygon.n++] = interp;
        new_polygon.p[new_polygon.n++] = p.p[i + 1];
      }
    }
  }
  p.n = 0;
  if (new_polygon.n == 0) return;
  p.p[p.n++] = new_polygon.p[0];
  for (int i = 1; i < new_polygon.n; i++)
    if (!(new_polygon.p[i] == new_polygon.p[i - 1]))
      p.p[p.n++] = new_polygon.p[i];
  if (p.n != 1 && (p.p[p.n - 1] == p.p[0])) p.n--;
  p.p[p.n] = p.p[0];
}
int n, h, f;
polygon a[550];
double cal(int th1, int th2) {
  polygon gao = a[th1];
  point cu[10];
  for (int i = 0; i < 4; i++) {
    cu[i] = a[th2].p[i];
    cu[i].y = -cu[i].y;
  }
  for (int i = 0; i < 4; i++) {
    cut_polygon(cu[(i + 1) % 4], cu[i], gao);
  }
  double s = 0;
  for (int i = 1; i < gao.n - 1; i++)
    s += (gao.p[i] - gao.p[0]).X(gao.p[i + 1] - gao.p[0]);
  return fabs(s / 2);
}
int main() {
  scanf("%d%d%d", &n, &h, &f);
  double ans = 0;
  for (int i = 1; i <= n; i++) {
    double x, y;
    scanf("%lf%lf", &x, &y);
    line l1 = linefromsegment(point(0, f), point(x, h));
    a[i].p[0] = point((h * l1.b - l1.c) / l1.a, -h);
    a[i].p[1] = point((-h * l1.b - l1.c) / l1.a, h);
    l1 = linefromsegment(point(0, f), point(y, h));
    a[i].p[2] = point((-h * l1.b - l1.c) / l1.a, h);
    a[i].p[3] = point((h * l1.b - l1.c) / l1.a, -h);
    a[i].n = 4;
    for (int j = 1; j < 3; j++)
      ans += fabs((a[i].p[j] - a[i].p[0]).X(a[i].p[j + 1] - a[i].p[0]));
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) ans -= cal(i, j);
  printf("%lf\n", ans);
}