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;
int dcmp(double p) {
  if (fabs(p) < 1e-7) return 0;
  return p > 1e-7 ? 1 : -1;
}
struct Point {
  double x, y;
  Point() {}
  Point(double x, double y) : x(x), y(y) {}
  friend Point operator+(const Point &a, const Point &b) {
    return Point(a.x + b.x, a.y + b.y);
  }
  friend Point operator-(const Point &a, const Point &b) {
    return Point(a.x - b.x, a.y - b.y);
  }
  friend Point operator*(const Point &a, double p) {
    return Point(a.x * p, a.y * p);
  }
  friend Point operator/(const Point &a, double p) {
    return Point(a.x / p, a.y / p);
  }
};
double Cross(const Point &a, const Point &b) { return a.x * b.y - b.x * a.y; }
struct Line {
  Point p;
  Point v;
  double rad;
  Line() {}
  Line(const Point &p, const Point &v) : p(p), v(v) { rad = atan2(v.y, v.x); }
  friend bool operator<(const Line &a, const Line &b) {
    return dcmp(a.rad - b.rad) < 0;
  }
} L1, L2, up[510 * 2], down[510 * 2];
bool Left(Point p, Line q) {
  q.v = q.v / 1000;
  return dcmp(Cross(p - q.p, q.v)) < 0;
}
Point Get_Inter(const Line &a, const Line &b) {
  Point v = a.p - b.p;
  double t = Cross(b.v, v) / Cross(a.v, b.v);
  return a.p + a.v * t;
}
double area;
int n, tot;
double calc_area(Point p[], int n) {
  double area = 0;
  for (int i = 3; i <= n; i++)
    area = area - Cross(p[i] - p[1], p[i - 1] - p[1]) / 2;
  return area;
}
double halfspace(Line L[], int n) {
  sort(L + 1, L + n + 1);
  static Point inter[510];
  static Line queue[510];
  int front = 1, rear = 1;
  queue[rear] = L[1];
  for (int i = 2; i <= n; i++) {
    while (front < rear && !Left(inter[rear - 1], L[i])) rear--;
    while (front < rear && !Left(inter[front], L[i])) front++;
    queue[++rear] = L[i];
    if (!dcmp(queue[rear - 1].rad - L[i].rad) && Left(L[i].p, queue[--rear]))
      queue[rear] = L[i];
    if (front < rear) inter[rear - 1] = Get_Inter(queue[rear - 1], queue[rear]);
  }
  while (rear > front && !Left(inter[rear - 1], queue[front])) rear--;
  if (rear - front <= 1) return 0;
  inter[rear] = Get_Inter(queue[rear], queue[front]);
  for (int i = 1; i <= rear - front + 1; i++) inter[i] = inter[i + front - 1];
  return calc_area(inter, rear - front + 1);
}
double l[510], r[510];
void read() {
  double w, h;
  scanf("%d %lf %lf", &n, &w, &h);
  Point sun, moon;
  sun = Point(0, h), moon = Point(0, -h);
  L1 = Line(Point(0, w), Point(-1, 0)), L2 = Line(Point(0, -w), Point(1, 0));
  static Line L[10];
  for (int i = 1; i <= n; i++) {
    scanf("%lf %lf", &l[i], &r[i]);
    Point pl, pr;
    pl = Point(l[i], w), pr = Point(r[i], w);
    up[i * 2 - 1] = Line(sun, pl - sun), up[i * 2] = Line(sun, sun - pr);
    pl = Point(l[i], -w), pr = Point(r[i], -w);
    down[i * 2 - 1] = Line(moon, moon - pl),
                 down[i * 2] = Line(moon, pr - moon);
    int s = 0;
    L[++s] = L1, L[++s] = L2, L[++s] = up[i * 2 - 1], L[++s] = up[i * 2];
    area = area + halfspace(L, s) * 2;
  }
}
void work() {
  static Line L[10];
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) {
      int s = 0;
      L[++s] = L1, L[++s] = L2, L[++s] = up[i * 2 - 1], L[++s] = up[i * 2],
      L[++s] = down[j * 2 - 1], L[++s] = down[j * 2];
      area = area - halfspace(L, s);
    }
}
int main() {
  read();
  work();
  printf("%.8lf\n", area);
  return 0;
}