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 &up, const point &dn) {
    return point(up.x + dn.x, up.y + dn.y);
  }
  inline friend point operator-(const point &up, const point &dn) {
    return point(up.x - dn.x, up.y - dn.y);
  }
  inline friend point operator*(const point &up, double p) {
    return point(up.x * p, up.y * p);
  }
  inline friend point operator/(const point &up, double p) {
    return point(up.x / p, up.y / p);
  }
  inline friend void operator+=(point &up, const point &dn) { up = up + dn; }
  inline friend void operator-=(point &up, const point &dn) { up = up - dn; }
  inline friend void operator*=(point &up, double dn) { up = up * dn; }
  inline friend void operator/=(point &up, double dn) { up = up / dn; }
  inline friend bool operator<(const point &up, const point &dn) {
    return up.x < dn.x - 1E-10 ||
           fabs(up.x - dn.x) < 1E-10 && up.y + 1E-10 < dn.y;
  }
  inline friend bool operator==(const point &up, const point &dn) {
    return !(up < dn || dn < up);
  }
  inline friend bool operator>(const point &up, const point &dn) {
    return dn < up;
  }
};
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 &up, const point &dn) {
  return up.x * dn.y - dn.x * up.y;
}
inline double dianji(const point &up, const point &dn) {
  return up.x * dn.x + up.y * dn.y;
}
inline double dis(const point &up, const point &dn) {
  return sqrt(sqr(up.x - dn.x) + sqr(up.y - dn.y));
}
inline double dis(const XL &up) { return dis(up.a, up.b); }
inline double dis(const point &up) { return sqrt(sqr(up.x) + sqr(up.y)); }
inline double atan2(const point &up) { return gag(atan2(up.y, up.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 up, double dn) {
  double u1, u2, u3, u4, u5, u6, u7, u8, u9;
  if (up * dn <= 0) return 0;
  if (up < 0) up = -up, dn = -dn;
  u1 = (f - h) / up, u2 = (f - h) / dn;
  u3 = (-2 * f) / (-u1 - u2);
  u4 = u2 * u3 - f;
  if (u4 > h)
    u5 = (dn + dn / (f - h) * (f + h)) * h * 2 / 2;
  else if (u4 < -h)
    u5 = (up + up / (f - h) * (f + h)) * h * 2 / 2;
  else
    u5 = (dn + u3) * (h + u4) / 2 + (up + 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++) 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;
}