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;
using namespace rel_ops;
const double PI = acos((double)-1);
int ts, ts2, ts3, ts4;
int n, m;
long long gcd(long long x, long long y) {
  long long t;
  for (; y != 0;) {
    t = x % y;
    x = y;
    y = t;
  }
  return x;
}
double sqr(double x) { return x * x; }
class point {
 public:
  double x, y;
  point() { x = y = 0; }
  point(double a, double b) { x = a, y = b; }
  inline friend point operator+(const point &A, const point &B) {
    return point(A.x + B.x, A.y + B.y);
  }
  inline friend point operator-(const point &A, const point &B) {
    return point(A.x - B.x, A.y - B.y);
  }
  inline friend point operator*(const point &A, double p) {
    return point(A.x * p, A.y * p);
  }
  inline friend point operator/(const point &A, double p) {
    return point(A.x / p, A.y / p);
  }
  inline friend void operator+=(point &A, const point &B) { A = A + B; }
  inline friend void operator-=(point &A, const point &B) { A = A - B; }
  inline friend void operator*=(point &A, double B) { A = A * B; }
  inline friend void operator/=(point &A, double B) { A = A / B; }
  inline friend bool operator<(const point &A, const point &B) {
    return A.x < B.x - 1E-10 || fabs(A.x - B.x) < 1E-10 && A.y + 1E-10 < B.y;
  }
  inline friend bool operator==(const point &A, const point &B) {
    return !(A < B || B < A);
  }
  inline friend bool operator>(const point &A, const point &B) { return B < A; }
};
class XL {
 public:
  point a, b;
  XL() {}
  XL(point x, point y) {
    a = x;
    b = y;
  }
  XL(double t1, double t2, double t3, double t4) {
    a.x = t1;
    a.y = t2;
    b.x = t3;
    b.y = t4;
  }
};
inline double gag(double x) {
  if (x < -PI - 1E-10) return gag(x + 2 * PI);
  if (x > PI - 1E-10) return gag(x - 2 * PI);
  return x;
}
inline double gag2(double x) {
  if (x < -1E-10) return gag2(x + 2 * PI);
  if (x > 2 * PI - 1E-10) return gag2(x - 2 * PI);
  return x;
}
inline double chaji(const point &A, const point &B) {
  return A.x * B.y - B.x * A.y;
}
inline double dianji(const point &A, const point &B) {
  return A.x * B.x + A.y * B.y;
}
inline double dis(const point &A, const point &B) {
  return sqrt(sqr(A.x - B.x) + sqr(A.y - B.y));
}
inline double dis(const XL &A) { return dis(A.a, A.b); }
inline double dis(const point &A) { return sqrt(sqr(A.x) + sqr(A.y)); }
inline double atan2(const point &A) { return gag(atan2(A.y, A.x)); }
inline point shengcheng(double JD, double CD = 1.0) {
  return point(cos(JD) * CD, sin(JD) * CD);
}
inline short sgn(double x) {
  if (fabs(x) < 1E-10)
    return 0;
  else if (x < 0)
    return -1;
  else
    return 1;
}
point poo = point(200000000000000000ll, 200000000000000000ll);
point cross(XL a, XL b) {
  double u1 = chaji(b.a - a.a, b.b - a.a), u2 = chaji(b.b - a.b, b.a - a.b);
  if (u1 + u2 == 0) return poo;
  return a.a + (a.b - a.a) * (u1 / (u1 + u2));
}
int online(point x, XL a) {
  return dis(x - a.b) + dis(a.a - x) <= dis(a) + 1E-10;
}
int iscross(XL a, XL b) {
  point pp = cross(a, b);
  return pp != poo && online(pp, a) && online(pp, b);
}
double l[1005], r[1005], ans;
double f, h;
double calc(double A, double B) {
  double u1, u2, u3, u4, u5, u6, u7, u8, u9;
  if (A * B <= 0) return 0;
  if (A < 0) A = -A, B = -B;
  u1 = (f - h) / A, u2 = (f - h) / B;
  u3 = (-2 * f) / (-u1 - u2);
  u4 = u2 * u3 - f;
  if (u4 > h)
    u5 = (B + B / (f - h) * (f + h)) * h * 2 / 2;
  else if (u4 < -h)
    u5 = (A + A / (f - h) * (f + h)) * h * 2 / 2;
  else
    u5 = (B + u3) * (h + u4) / 2 + (A + u3) * (h - u4) / 2;
  return u5;
}
int main() {
  int i, j, k, t1, t2, t3, t4, t5, t6, t7, t8, t9, t, nw;
  int tt1, tt2, tt3, tt4;
  double u1, u2, u3, u4, u5, u6, u7, u8, u9;
  char c1, c2, c3;
  srand((unsigned)time(0));
  cin >> n >> h >> f;
  for (i = 1; i <= n; i++) cin >> l[i] >> r[i];
  for (i = 1; i <= n; i++)
    if (l[i] < 0 && r[i] > 0) {
      n++;
      l[n] = l[i], r[n] = 0, l[i] = 0;
      break;
    }
  for (i = 1; i <= n; i++) ans += (r[i] - l[i]) * f * h / (f - h) * 2 * 2;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= n; j++) {
      ans -= calc(r[i], r[j]);
      ans -= calc(l[i], l[j]);
      ans += calc(l[i], r[j]);
      ans += calc(r[i], l[j]);
    }
  cout << setprecision(10) << fixed << ans << endl;
  return 0;
}