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 m, n, j, k, l, i, o, p, __t;
double ans;
struct edge {
  double L, R;
} Ed[2000];
double h, F, ss[2000];
struct point {
  double x, y;
};
vector<point> ret, final;
double cross(point a, point b, point c) {
  return (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x);
}
double dist(point a, point b) {
  return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
bool inside(point a, point b, point c) {
  if (abs(cross(a, b, c)) > (1e-8)) return 0;
  if (c.x < min(a.x, b.x) - (1e-8) || c.x > max(a.x, b.x) ||
      c.y < min(a.y, b.y) || c.y > max(a.y, b.y))
    return 0;
  return 1;
}
bool operator==(point a, point b) {
  return abs(a.x - b.x) < (1e-8) && abs(a.y - b.y) < (1e-8);
}
double f(double a11, double a12, double a21, double a22) {
  return a11 * a22 - a12 * a21;
}
double get_line(double &a, double &b, double &c, point a1, point a2) {
  if (abs(a1.y - a2.y) < (1e-8))
    a = 0, b = 1;
  else if (abs(a1.x - a2.x) < (1e-8))
    b = 0, a = 1;
  else
    a = 1, b = -(a * (a1.x - a2.x)) / (a1.y - a2.y);
  c = -a * a1.x - b * a1.y;
}
point getcross(point A1, point A2, point B1, point B2) {
  if ((A1 == B1 && A2 == B2) || (A1 == B2 && A2 == B1)) {
    ret.push_back(A1);
    return A2;
  }
  double a1, b1, c1, a2, b2, c2;
  get_line(a1, b1, c1, A1, A2);
  get_line(a2, b2, c2, B1, B2);
  point ret;
  ret.x = -f(c1, b1, c2, b2) / f(a1, b1, a2, b2);
  ret.y = -f(a1, c1, a2, c2) / f(a1, b1, a2, b2);
  return ret;
}
bool cut(point l1, point r1, point l2, point r2) {
  return (cross(l1, r1, l2) * cross(l1, r1, r2) < 0 &&
          cross(l2, r2, l1) * cross(l2, r2, r1) < 0);
}
double size(point a, point b, point c) {
  double d1 = dist(a, b);
  double d2 = dist(a, c);
  double d3 = dist(b, c);
  double t = (d1 + d2 + d3) / 2;
  return sqrt(t * (t - d1) * (t - d2) * (t - d3));
}
bool cmp(edge a, edge b) { return a.L - b.L < 0; }
double calced(double x1, double x2) {
  double x3 = x1 / (F - h) * (F + h);
  double x4 = x2 / (F - h) * (F + h);
  point A, B, C, D;
  A.x = x1, A.y = h;
  B.x = x3, B.y = -h;
  C.x = x2, C.y = -h;
  D.x = x4, D.y = h;
  if (!cut(A, B, C, D)) return h * max(x1 + x3, x2 + x4);
  return h * (x3 + x4) - size(B, D, getcross(A, B, C, D));
}
void calc(double l1, double r1, double l2, double r2) {
  ans += calced(l1, l2);
  ans += calced(r1, r2);
  ans -= calced(l1, r2);
  ans -= calced(l2, r1);
}
int main() {
  scanf("%d%lf%lf", &m, &h, &F);
  n = m;
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &j, &k);
    if (j < 0 && k > 0)
      Ed[i].L = j, Ed[i].R = 0, Ed[++n].L = 0, Ed[n].R = k;
    else
      Ed[i].L = j, Ed[i].R = k;
  }
  m = n;
  sort(Ed + 1, Ed + 1 + m, cmp);
  int large = 0;
  for (int i = 1; i <= m; i++) {
    double l = Ed[i].L, r = Ed[i].R, temp;
    if (l < 0) swap(l, r), l *= -1, r *= -1;
    ans += (ss[i] = 2 * h * ((r - l) / (F - h) * (F + h) + r - l));
    if (Ed[i].R < (1e-8)) large = i;
  }
  for (int i = 1; i <= large; i++)
    for (int j = 1; j <= large; j++) {
      double l1 = Ed[i].L, r1 = Ed[i].R;
      double l2 = Ed[j].L, r2 = Ed[j].R;
      calc(-r1, -l1, -r2, -l2);
    }
  for (int i = large + 1; i <= m; i++)
    for (int j = large + 1; j <= m; j++) {
      double l1 = Ed[i].L, r1 = Ed[i].R;
      double l2 = Ed[j].L, r2 = Ed[j].R;
      calc(l1, r1, l2, r2);
    }
  printf("%.8lf\n", ans);
}