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 MAXN = 510;
const double EPS = 1e-12, T = 1;
pair<double, double> operator+(const pair<double, double> &a,
                               const pair<double, double> &b) {
  return make_pair(a.first + b.first, a.second + b.second);
}
pair<double, double> operator-(const pair<double, double> &a,
                               const pair<double, double> &b) {
  return make_pair(a.first - b.first, a.second - b.second);
}
pair<double, double> operator*(const pair<double, double> &a, double k) {
  return make_pair(a.first * k, a.second * k);
}
pair<double, double> operator/(const pair<double, double> &a, double k) {
  return make_pair(a.first / k, a.second / k);
}
double det(const pair<double, double> &a, const pair<double, double> &b) {
  return a.first * b.second - b.first * a.second;
}
pair<double, double> intersect(const pair<double, double> &a,
                               const pair<double, double> &b,
                               const pair<double, double> &c,
                               const pair<double, double> &d) {
  double k1 = det(b - a, c - a), k2 = det(b - a, d - a);
  if (fabs(k1 - k2) < EPS) return make_pair(0, 0);
  return (d * k1 - c * k2) / (k1 - k2);
}
pair<double, double> p[MAXN];
pair<double, pair<pair<double, double>, pair<double, double> > > h[MAXN];
int m, n;
double half_plane() {
  static int head, tail, que[MAXN];
  head = 0, tail = 0, que[0] = 1;
  sort(h + 1, h + n + 1);
  for (int i = 2; i <= n; ++i) {
    while (head < tail &&
           det(h[i].second.second, p[tail - 1] - h[i].second.first) < EPS)
      --tail;
    while (head < tail &&
           det(h[i].second.second, p[head] - h[i].second.first) < EPS)
      ++head;
    que[++tail] = i;
    if (head < tail &&
        fabs(h[que[tail - 1]].first - h[que[tail]].first) < EPS) {
      if (det(h[i].second.second,
              h[que[tail - 1]].second.first - h[i].second.first) < EPS)
        que[tail - 1] = i;
      --tail;
    }
    if (head < tail)
      p[tail - 1] = intersect(
          h[que[tail - 1]].second.first,
          h[que[tail - 1]].second.first + h[que[tail - 1]].second.second,
          h[que[tail]].second.first,
          h[que[tail]].second.first + h[que[tail]].second.second);
  }
  while (head < tail && det(h[que[head]].second.second,
                            p[tail - 1] - h[que[head]].second.first) < EPS)
    --tail;
  if (!(tail - head > 1)) return 0;
  p[tail] = intersect(h[que[head]].second.first,
                      h[que[head]].second.first + h[que[head]].second.second,
                      h[que[tail]].second.first,
                      h[que[tail]].second.first + h[que[tail]].second.second);
  double CC = 0;
  for (int i = head; i <= tail; ++i) {
    int j = (i + 1) > tail ? head : (i + 1);
    CC += det(p[i] - p[head], p[j] - p[head]);
  }
  return fabs(CC) / 2.0;
}
double H, f, l[MAXN], r[MAXN];
pair<double, pair<pair<double, double>, pair<double, double> > > t1[MAXN][4],
    t2[MAXN][4];
double solve(int first, int second) {
  n = 8;
  memcpy(h + 1, t1[first], sizeof(t1[first]));
  memcpy(h + 5, t2[second], sizeof(t2[second]));
  for (int i = 1; i <= n; ++i)
    h[i].first = atan2(h[i].second.second.second, h[i].second.second.first);
  return half_plane();
}
int main() {
  cin >> m >> H >> f;
  pair<double, double> O = make_pair(0.0, f), O1 = make_pair(0.0, -f);
  double CC = 0;
  for (int i = 1; i <= m; ++i) {
    cin >> l[i] >> r[i];
    pair<double, double> A = make_pair(l[i], H), B = make_pair(r[i], H),
                         D = intersect(O, A, make_pair(0.0, 0.0),
                                       make_pair(1.0, 0.0)),
                         C = intersect(O, B, make_pair(0.0, 0.0),
                                       make_pair(1.0, 0.0));
    pair<double, double> E = intersect(O1, C, make_pair(0.0, H),
                                       make_pair(1.0, H)),
                         F = intersect(O1, D, make_pair(0.0, H),
                                       make_pair(1.0, H));
    CC += fabs(det(D - A, C - A) + det(C - A, B - A)) / 2 +
          fabs(det(D - F, C - F) + det(C - F, E - F)) / 2;
    t1[i][0].second = make_pair(A, D - A),
    t1[i][1].second = make_pair(D, C - D),
    t1[i][2].second = make_pair(C, B - C),
    t1[i][3].second = make_pair(B, A - B);
    t2[i][0].second = make_pair(F, D - F),
    t2[i][1].second = make_pair(D, C - D),
    t2[i][2].second = make_pair(C, E - C),
    t2[i][3].second = make_pair(E, F - E);
  }
  for (int i = 1; i <= m; ++i)
    for (int j = 1; j <= m; ++j) {
      CC -= solve(i, j);
    }
  printf("%.10lf\n", CC * 2.0);
  fclose(stdin);
  fclose(stdout);
  return 0;
}