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.
#include <bits/stdc++.h>
using namespace std;
struct seg {
  int l, r;
} a[510], b[510];
struct rec {
  double l1, l2, r1, r2;
} p[1010];
struct point {
  double x, y;
  void init(double _x, double _y) {
    x = _x;
    y = _y;
  }
} q[1010], qq[5];
int m, n, H, F, N, T, h;
int nxt[1010], in[1010];
double ans, A, B, C;
inline bool cmp(seg A, seg B) { return A.l < B.l; }
void Init() {
  scanf("%d%d%d", &m, &H, &F);
  for (int i = 1; i <= m; ++i) scanf("%d%d", &b[i].l, &b[i].r);
  sort(b + 1, b + m + 1, cmp);
  int l = b[1].l, r = b[1].r;
  for (int i = 2; i <= m; ++i)
    if (b[i].l <= r)
      r = max(r, b[i].r);
    else {
      ++n;
      a[n].l = l;
      a[n].r = r;
      l = b[i].l;
      r = b[i].r;
    }
  ++n;
  a[n].l = l;
  a[n].r = r;
}
void Work() {
  for (int i = 1; i <= n; ++i)
    ans += ((double)(a[i].r - a[i].l) / (F - H) * (F + H) + (a[i].r - a[i].l)) *
           H * 2;
}
inline point GetPoint(double a, double b, double c, int i, int j) {
  point ans;
  if (q[i].x == q[j].x) {
    ans.x = q[i].x;
    ans.y = (-c - ans.x * a) / b;
  } else {
    double k = (q[j].y - q[i].y) / (q[j].x - q[i].x), t = q[i].y - q[i].x * k;
    ans.x = (-c - b * t) / (a + b * k);
    ans.y = k * ans.x + t;
  }
  return ans;
}
inline bool Insert(double a, double b, double c) {
  int i = h;
  bool f1 = 1, f2 = 0;
  do {
    if (a * q[i].x + b * q[i].y + c >= 1e-8)
      in[i] = 1, f1 = 0;
    else if (a * q[i].x + b * q[i].y + c <= -1e-8)
      in[i] = 0, f2 = 1;
    else
      in[i] = 0;
    i = nxt[i];
  } while (i != h);
  if (f1) return 1;
  if (f2) {
    int P, Q;
    i = h;
    do {
      if (in[i] && !in[nxt[i]]) P = i;
      if (!in[i] && in[nxt[i]]) Q = i;
      i = nxt[i];
    } while (i != h);
    q[++T] = GetPoint(a, b, c, P, nxt[P]);
    nxt[P] = T;
    nxt[T] = T + 1;
    q[++T] = GetPoint(a, b, c, Q, nxt[Q]);
    nxt[T] = nxt[Q];
    h = T;
  }
  return 0;
}
inline void Get(point a, point b) {
  if (a.x == b.x)
    A = -1, B = 0, C = a.x;
  else {
    double k = (b.y - a.y) / (b.x - a.x), t = b.y - b.x * k;
    A = k;
    B = -1;
    C = t;
  }
  if (A < 0) A *= -1, B *= -1, C *= -1;
}
inline double Chen(point A, point B) { return A.x * B.y - A.y * B.x; }
inline double Calc(int i, int j) {
  T = 4;
  h = 1;
  q[1].x = (double)a[i].l * (H + F) / (F - H);
  q[1].y = H;
  nxt[1] = 2;
  q[2].x = (double)a[i].r * (H + F) / (F - H);
  q[2].y = H;
  nxt[2] = 3;
  q[3].x = a[i].r;
  q[3].y = -H;
  nxt[3] = 4;
  q[4].x = a[i].l;
  q[4].y = -H;
  nxt[4] = 1;
  qq[1].x = a[j].l;
  qq[1].y = H;
  qq[2].x = a[j].r;
  qq[2].y = H;
  qq[3].x = (double)a[j].r * (H + F) / (F - H);
  qq[3].y = -H;
  qq[4].x = (double)a[j].l * (H + F) / (F - H);
  qq[4].y = -H;
  Get(qq[2], qq[3]);
  if (Insert(-A, -B, -C)) return 0;
  Get(qq[4], qq[1]);
  if (Insert(A, B, C)) return 0;
  double ans = 0;
  int I = h;
  do {
    ans += Chen(q[I], q[nxt[I]]);
    I = nxt[I];
  } while (I != h);
  return abs(ans) / 2;
}
void Solve() {
  Calc(1, 2);
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j) ans -= Calc(i, j);
  printf("%.10lf\n", ans);
}
int main() {
  Init();
  Work();
  Solve();
  return 0;
}
