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 eps = 1e-12;
const int N = 32;
bool zero(double x) { return fabs(x) < eps; }
int sgn(double x) {
  if (x < -eps) return -1;
  if (x > eps) return 1;
  return 0;
}
struct Point {
  double x, y;
  Point(double _x = 0, double _y = 0) { x = _x, y = _y; }
  void output() { printf("%f %f\n", x, y); }
} top[512][2], bot[512][2], p[32];
struct Segment {
  Point s, e;
  double angle;
  void get_angle() { angle = atan2(e.y - s.y, e.x - s.x); }
};
int m;
double h, f;
double xmul(Point p0, Point p1, Point p2) {
  return (p1.x - p0.x) * (p2.y - p0.y) - (p2.x - p0.x) * (p1.y - p0.y);
}
Point Get_Intersect(Segment s1, Segment s2) {
  double u = xmul(s1.s, s1.e, s2.s), v = xmul(s1.e, s1.s, s2.e);
  Point t;
  t.x = (s2.s.x * v + s2.e.x * u) / (u + v);
  t.y = (s2.s.y * v + s2.e.y * u) / (u + v);
  return t;
}
bool cmp(Segment s1, Segment s2) {
  if (s1.angle > s2.angle)
    return true;
  else if (zero(s1.angle - s2.angle) && xmul(s2.s, s2.e, s1.e) > -eps)
    return true;
  return false;
}
void HalfPlaneIntersect(Segment seg[], int n) {
  sort(seg, seg + n, cmp);
  int tmp = 1;
  for (int i = 1; i < n; i++)
    if (!zero(seg[i].angle - seg[tmp - 1].angle)) seg[tmp++] = seg[i];
  n = tmp;
  Segment deq[N];
  deq[0] = seg[0];
  deq[1] = seg[1];
  int head = 0, tail = 1;
  for (int i = 2; i < n; i++) {
    while (head < tail && xmul(seg[i].s, seg[i].e,
                               Get_Intersect(deq[tail], deq[tail - 1])) < -eps)
      tail--;
    while (head < tail && xmul(seg[i].s, seg[i].e,
                               Get_Intersect(deq[head], deq[head + 1])) < -eps)
      head++;
    deq[++tail] = seg[i];
  }
  while (head < tail && xmul(deq[head].s, deq[head].e,
                             Get_Intersect(deq[tail], deq[tail - 1])) < -eps)
    tail--;
  while (head < tail && xmul(deq[tail].s, deq[tail].e,
                             Get_Intersect(deq[head], deq[head + 1])) < -eps)
    head++;
  if (head == tail) return;
  for (int i = head; i < tail; i++) p[m++] = Get_Intersect(deq[i], deq[i + 1]);
  if (tail > head + 1) p[m++] = Get_Intersect(deq[head], deq[tail]);
}
double Get_area(Point p[], int &n) {
  double area = 0;
  for (int i = 1; i < n - 1; i++) area += xmul(p[0], p[i], p[i + 1]);
  return fabs(area) / 2.0;
}
double solve(int i, int j) {
  int n = 0;
  Segment seg[N];
  seg[n].s = Point(0, f);
  seg[n].e = top[i][0];
  seg[n++].get_angle();
  seg[n].s = top[i][1], h, seg[n].e = Point(0, f);
  seg[n++].get_angle();
  seg[n].s = Point(0, -f);
  seg[n].e = bot[j][1];
  seg[n++].get_angle();
  seg[n].s = bot[j][0], seg[n].e = Point(0, -f);
  seg[n++].get_angle();
  seg[n].s = Point(0, h), seg[n].e = Point(-1000, h);
  seg[n++].get_angle();
  seg[n].s = Point(-1000, 0), seg[n].e = Point(0, 0);
  seg[n++].get_angle();
  m = 0;
  HalfPlaneIntersect(seg, n);
  return Get_area(p, m);
}
int main() {
  int n;
  while (scanf("%d%lf%lf", &n, &h, &f) != EOF) {
    double ans = 0;
    for (int i = 0; i < n; i++) {
      double tl, tr;
      scanf("%lf%lf", &tl, &tr);
      top[i][0] = Point(tl, h);
      top[i][1] = Point(tr, h);
      bot[i][0] = Point(tl, -h);
      bot[i][1] = Point(tr, -h);
      ans += ((tr - tl) + (tr - tl) * (f + h) / (f - h)) * h;
    }
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++) {
        ans -= solve(i, j);
      }
    printf("%.10f\n", ans * 2);
  }
}