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>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
int n;
int m;
double h, f;
double l[1000], r[1000];
void print(pair<double, double> p) {
  cout << p.first << ' ' << p.second << endl;
}
pair<double, double> intersect(double x1, double y95874, double x2, double y2,
                               double x3, double y3, double x4, double y4);
double cross(double x1, double y95874, double x2, double y2) {
  return x1 * y2 - x2 * y95874;
}
double dist(pair<double, double> a, pair<double, double> b) {
  return sqrt(((a.first - b.first) * (a.first - b.first)) +
              ((a.second - b.second) * (a.second - b.second)));
}
double getS(pair<double, double> p1, pair<double, double> p2,
            pair<double, double> p3) {
  double a = dist(p1, p2);
  double b = dist(p2, p3);
  double c = dist(p1, p3);
  double p = (a + b + c) / 2;
  return sqrt(abs(p * (p - a) * (p - b) * (p - c)));
}
bool l2(pair<double, double> a, pair<double, double> b) {
  return a.second < b.second;
}
double eps = 1e-8;
double getans(pair<double, double> p1, pair<double, double> p2,
              pair<double, double> p3, double y) {
  double s = getS(p1, p2, p3);
  pair<double, double> p[3];
  p[0] = p1;
  p[1] = p2;
  p[2] = p3;
  sort(p, p + 3, l2);
  p1 = p[0];
  p2 = p[1];
  p3 = p[2];
  if (p[0].second > y - eps) return s;
  if (p[2].second < y + eps) return 0;
  if (p[1].second > y) {
    pair<double, double> pp1 =
        intersect(p1.first, p1.second, p2.first, p2.second, 0.5, y, 1.5, y);
    pair<double, double> pp2 =
        intersect(p1.first, p1.second, p3.first, p3.second, 0.5, y, 1.5, y);
    return s - getS(pp1, pp2, p1);
  } else {
    pair<double, double> pp1 =
        intersect(p3.first, p3.second, p2.first, p2.second, 0.5, y, 1.5, y);
    pair<double, double> pp2 =
        intersect(p3.first, p3.second, p1.first, p1.second, 0.5, y, 1.5, y);
    return getS(pp1, pp2, p3);
  }
}
double getS(pair<double, double> p1, pair<double, double> p2,
            pair<double, double> p3, double ly, double ry) {
  double o = getans(p1, p2, p3, ly) - getans(p1, p2, p3, ry);
  return o;
}
double getS(pair<double, double> p1, pair<double, double> p2,
            pair<double, double> p3, pair<double, double> p4, double ly,
            double ry) {
  double ans = getS(p1, p2, p3, ly, ry) + getS(p1, p3, p4, ly, ry);
  return ans;
}
double getS(pair<double, double> p1, pair<double, double> p2,
            pair<double, double> p3, pair<double, double> p4) {
  double ans = getS(p1, p2, p3) + getS(p1, p3, p4);
  return ans;
}
int glob;
pair<double, double> intersect(double x1, double y95874, double x2, double y2,
                               double x3, double y3, double x4, double y4) {
  double tmp1 = cross(x2 - x1, y2 - y95874, x3 - x2, y3 - y2);
  double tmp2 = cross(x4 - x3, y4 - y3, x1 - x4, y95874 - y4);
  if (abs(tmp1) < eps && abs(tmp2) < eps) {
    return make_pair(x1, y95874);
  }
  double d = cross(x2 - x1, y2 - y95874, x3 - x4, y3 - y4);
  if (abs(d) < eps) {
    glob = 1;
    return make_pair(0, 0);
  }
  double d1 = cross(x3 - x1, y3 - y95874, x3 - x4, y3 - y4);
  double p = d1 / d;
  double x = x1 + p * (x2 - x1);
  double y = y95874 + p * (y2 - y95874);
  return make_pair(x, y);
}
int main() {
  cin >> n >> h >> f;
  double ans = 0;
  int p = 0;
  for (int i = 0; i < (n); i++) {
    double x1, x2;
    cin >> x1 >> x2;
    if (x1 < 0 && x2 > 0) {
      l[p] = 0;
      r[p] = x2;
      p++;
      l[p] = x1;
      r[p] = 0;
      p++;
    } else {
      l[p] = x1;
      r[p] = x2;
      p++;
    }
  }
  n = p;
  for (int i = 0; i < (n); i++) {
    pair<double, double> p1 = intersect(0, f, l[i], h, 0.5, -h, 1.5, -h);
    pair<double, double> p2 = intersect(0, f, r[i], h, 0.5, -h, 1.5, -h);
    pair<double, double> p3 = make_pair(r[i], h);
    pair<double, double> p4 = make_pair(l[i], h);
    double s = getS(p1, p2, p3, p4);
    ans += 2 * s;
  }
  for (int i = 0; i < (n); i++)
    for (int j = 0; j < (n); j++)
      if (((r[i] + l[i]) > -eps) ^ ((r[j] + l[j]) > -eps) == 0) {
        glob = 0;
        pair<double, double> p1 = intersect(0, f, l[i], h, 0, -f, l[j], -h);
        if (glob) continue;
        pair<double, double> p2 = intersect(0, f, l[i], h, 0, -f, r[j], -h);
        if (glob) continue;
        pair<double, double> p3 = intersect(0, f, r[i], h, 0, -f, r[j], -h);
        if (glob) continue;
        pair<double, double> p4 = intersect(0, f, r[i], h, 0, -f, l[j], -h);
        if (glob) continue;
        double s = getS(p1, p2, p3, p4, -h, h);
        ans -= s;
      }
  printf("%.6lf", ans);
  return 0;
}
