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 int MOD = 1000000007, dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};
const long double eps = 1e-8, pi = acos(-1);
void read(int &k) {
  k = 0;
  char x = getchar();
  while (x < '0' || x > '9') x = getchar();
  while (x >= '0' && x <= '9') {
    k = k * 10 - 48 + x;
    x = getchar();
  }
}
int cmp(long double x, long double y) {
  if (fabs(x - y) < eps) return 0;
  return x < y ? -1 : 1;
}
int sgn(long double x) { return cmp(x, 0); }
struct point {
  long double x, y, z;
  point() { z = 1; }
  point(long double xx, long double yy, long double zz) {
    x = xx;
    y = yy;
    z = zz;
  }
  long double operator*(point b) { return x * b.x + y * b.y + z * b.z; }
  point operator*(long double k) { return (point){k * x, k * y, z}; }
  point operator/(point b) {
    return (point){y * b.z - z * b.y, z * b.x - x * b.z, x * b.y - y * b.x};
  }
  point operator-(point b) { return (point){x - b.x, y - b.y, z}; }
  point operator+(point b) { return (point){x + b.x, y + b.y, z}; }
  void rotate(long double theta) {
    point T = *this;
    x = T.x * cos(theta) - T.y * sin(theta);
    y = T.x * sin(theta) + T.y * cos(theta);
  }
  void output() { printf("%.9lf %.9lf ", double(x), double(y)); }
  bool operator<(point b) const {
    int t = cmp(x, b.x);
    if (t == 0) return cmp(y, b.y) < 0;
    return t < 0;
  }
  void update() {
    if (!sgn(z)) return;
    x /= z;
    y /= z;
    z = 1;
  }
};
int inl(point x, point y, point z) { return cmp(x * (y / z), 0) == 0; }
point Normal(point y, point z) {
  point tmp = z - y;
  tmp.rotate(pi / 2);
  return tmp;
}
point Mirror(point x, point y, point z) {
  point nvec;
  nvec = Normal(y, z);
  point tmp = y / z, o, nxt;
  o = (point){tmp.y, -tmp.x, 0};
  o.z = -(x.x * o.x + x.y * o.y);
  nxt = o / tmp;
  nxt.x /= nxt.z;
  nxt.y /= nxt.z;
  nxt.z = 1;
  return nxt * 2 - x;
}
int in(point x, point y, point z) {
  int flag1 = 0, flag2 = 0;
  if (cmp(x.x, y.x) >= 0 && cmp(x.x, z.x) <= 0) flag1 = 1;
  if (cmp(x.x, z.x) >= 0 && cmp(x.x, y.x) <= 0) flag1 = 1;
  if (cmp(x.y, y.y) >= 0 && cmp(x.y, z.y) <= 0) flag2 = 1;
  if (cmp(x.y, z.y) >= 0 && cmp(x.y, y.y) <= 0) flag2 = 1;
  return flag1 & flag2;
}
int intersect(point x0, point y0, point x1, point y1, point &ret) {
  point l1, l2;
  l1 = x0 / y0;
  l2 = x1 / y1;
  ret = l1 / l2;
  if (cmp(ret.z, 0) == 0) return 0;
  ret.x /= ret.z;
  ret.y /= ret.z;
  ret.z = 1;
  return in(ret, x0, y0) && in(ret, x1, y1);
}
int cross(point x0, point y0, point x1, point y1) {
  if (inl(x1, x0, y0) && inl(y1, x0, y0))
    return in(x1, x0, y0) || in(y1, x0, y0) || in(x0, x1, y1) || in(y0, x1, y1);
  point a = y0 - x0;
  int flag1 = 0, flag2 = 0;
  if (cmp(((x1 - x0) / a).z * ((y1 - x0) / a).z, 0) <= 0) flag1 = 1;
  a = y1 - x1;
  if (cmp(((x0 - x1) / a).z * ((y0 - x1) / a).z, 0) <= 0) flag2 = 1;
  return flag1 & flag2;
}
point midvectical(point x, point y) {
  point ret = x / y, z = (x + y) * 0.5;
  swap(ret.x, ret.y);
  ret.y = -ret.y;
  ret.z = -(z.x * ret.x + z.y * ret.y);
  return ret;
}
long double dist(point a, point b) { return hypot(a.x - b.x, a.y - b.y); }
point lis[20], U, D, a0, a1, a2, a3, l0, l1, b0, b1, b2, b3, l2, l3, b4, b5, b6,
    b7, UR, DR;
int len, n, q0[20], q1[20];
long double H, F, ans, L[510], R[510];
long double calc(long double L, long double R) {
  return (R - L) * ((F + H) * (F + H) / (F - H) - F + H);
}
bool OK(point x) {
  if (!sgn(x.z)) return 0;
  if (cmp(x.y, H) > 0 || cmp(x.y, -H) < 0) return 0;
  if (sgn(sgn(((a2 - U) / (x - U)).z) * sgn(((a3 - U) / (x - U)).z)) > 0)
    return 0;
  if (sgn(sgn(((a0 - D) / (x - D)).z) * sgn(((a1 - D) / (x - D)).z)) > 0)
    return 0;
  return 1;
}
long double convex() {
  int l0 = 0, l1 = 0;
  sort(lis + 1, lis + len + 1);
  for (int i = len; i; i--) lis[i] = lis[i] - lis[1];
  for (int i = 1; i <= len; i++) {
    while (
        l0 > 1 &&
        sgn(((lis[i] - lis[q0[l0 - 1]]) / (lis[q0[l0]] - lis[q0[l0 - 1]])).z) <=
            0)
      l0--;
    q0[++l0] = i;
  }
  for (int i = 1; i <= len; i++) {
    while (
        l1 > 1 &&
        sgn(((lis[i] - lis[q1[l1 - 1]]) / (lis[q1[l1]] - lis[q1[l1 - 1]])).z) >=
            0)
      l1--;
    q1[++l1] = i;
  }
  for (int i = l1 - 1; i > 1; i--) q0[++l0] = q1[i];
  long double ret = 0;
  for (int i = 2; i < l0; i++) ret += (lis[q0[i]] / lis[q0[i + 1]]).z;
  return fabs(ret / 2);
}
int main() {
  cin >> n >> H >> F;
  U = (point){0, F, 1};
  D = (point){0, -F, 1};
  UR = (point){0, -1, H};
  DR = (point){0, 1, H};
  for (int i = 1; i <= n; i++) {
    cin >> L[i] >> R[i];
    ans += calc(L[i], R[i]);
  }
  for (int i = 1; i <= n; i++) {
    a0 = (point){L[i], -H, 1};
    a1 = (point){R[i], -H, 1};
    l0 = a0 / D;
    l1 = a1 / D;
    b4 = l0 / UR;
    b4.update();
    b5 = l1 / UR;
    b5.update();
    for (int j = 1; j <= n; j++) {
      a2 = (point){L[j], H, 1};
      a3 = (point){R[j], H, 1};
      l2 = a2 / U;
      l3 = a3 / U;
      b0 = l0 / l2;
      b0.update();
      b1 = l0 / l3;
      b1.update();
      b2 = l1 / l2;
      b2.update();
      b3 = l1 / l3;
      b3.update();
      b6 = l2 / DR;
      b6.update();
      b7 = l3 / DR;
      b7.update();
      len = 0;
      if (OK(b0)) lis[++len] = b0;
      if (OK(b1)) lis[++len] = b1;
      if (OK(b2)) lis[++len] = b2;
      if (OK(b3)) lis[++len] = b3;
      if (OK(b4)) lis[++len] = b4;
      if (OK(b5)) lis[++len] = b5;
      if (OK(b6)) lis[++len] = b6;
      if (OK(b7)) lis[++len] = b7;
      if (OK(a0)) lis[++len] = a0;
      if (OK(a1)) lis[++len] = a1;
      if (OK(a2)) lis[++len] = a2;
      if (OK(a3)) lis[++len] = a3;
      ans -= convex();
    }
  }
  printf("%.9lf\n", double(ans));
  return 0;
}