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 double eps = 1e-8;
double Hh, Ff, ans;
double l[2010], r[2010];
int n, tot;
double getabs(double x) {
  if (x > 0) return x;
  return -x;
}
struct point {
  double x, y, rad;
  inline friend bool operator<(point x, point y) { return x.rad < y.rad; }
  inline bool operator<(const point A) { return rad < A.rad; }
  inline point(double a = 0, double b = 0) {
    x = a, y = b;
    if (getabs(x) < eps && getabs(y) < eps)
      rad = -1e20;
    else
      rad = atan2(y, x);
    ;
  }
  inline point operator+(point A) { return point(x + A.x, y + A.y); }
  inline point operator-(point A) { return point(x - A.x, y - A.y); }
  inline point operator*(double A) { return point(x * A, y * A); }
  inline point operator/(double A) { return point(x / A, y / A); }
  inline point rotate(double A) {
    return point(x * cos(A) - y * sin(A), sin(A) + y * cos(A));
  }
  inline double operator*(point A) { return x * A.x + y * A.y; }
  inline double operator^(point A) { return x * A.y - y * A.x; }
  inline double dist() { return x * x + y * y; }
  inline double abs() { return sqrt(x * x + y * y); }
  inline void init() {
    scanf("%lf%lf", &x, &y);
    if (getabs(x) < eps && getabs(y) < eps)
      rad = -1e20;
    else
      rad = atan2(y, x);
  }
  inline void print() { printf("%.3lf %.3lf %.3lf\n", x, y, rad); }
};
vector<point> a;
bool cmp(const point A, const point B) { return A.rad < B.rad; }
double det(point A, point B, point C) { return (B - A) ^ (C - A); }
bool cross(point A, point B, point C, point D, point &O) {
  double s1 = det(A, B, C), s2 = det(A, B, D);
  if (getabs(s1 - s2) < eps) return O.x = 0, O.y = 0, O.rad = -1e20, 0;
  O = (C * s2 - D * s1) / (s2 - s1);
  return 1;
}
bool over(point A) { return A.y > Hh; }
bool below(point A) { return A.y < -Hh; }
double work() {
  int n = a.size();
  double res = 0;
  point G;
  for (int i = 0; i < n; i++) G = G + a[i];
  for (int i = 0; i < n; i++) a[i] = a[i] - G / n;
  sort(a.begin(), a.end(), cmp);
  for (int i = 0; i < n; i++) res += a[i] ^ a[(i + 1) % n];
  res /= 2;
  return getabs(res);
}
double calc(point A, point B, point C, point D) {
  if (B.x < eps && C.x > -eps) return 0;
  if (A.x > -eps && D.x < eps) return 0;
  point AA, BB, CC, DD, E, F, G, H;
  a.clear();
  bool flag[10], crossed[5];
  memset(flag, 0, sizeof(flag));
  memset(crossed, 0, sizeof(crossed));
  AA = A * (Ff + Hh) / (Ff - Hh), BB = B * (Ff + Hh) / (Ff - Hh),
  CC = C * (Ff + Hh) / (Ff - Hh), DD = D * (Ff + Hh) / (Ff - Hh);
  AA.y = BB.y = -Hh, CC.y = DD.y = Hh;
  crossed[1] = cross(A, AA, C, CC, E), crossed[2] = cross(B, BB, C, CC, F),
  crossed[3] = cross(B, BB, D, DD, G), crossed[4] = cross(A, AA, D, DD, H);
  if (crossed[1])
    if (over(E) || below(E)) {
      if (over(E)) flag[1] ^= 1, flag[7] ^= 1;
      if (below(E)) flag[5] ^= 1, flag[3] ^= 1;
    } else
      a.push_back(E);
  if (crossed[2])
    if (over(F) || below(F)) {
      if (over(F)) flag[2] ^= 1, flag[7] ^= 1;
      if (below(F)) flag[6] ^= 1, flag[3] ^= 1;
    } else
      a.push_back(F);
  if (crossed[3])
    if (over(G) || below(G)) {
      if (over(G)) flag[2] ^= 1, flag[8] ^= 1;
      if (below(G)) flag[6] ^= 1, flag[4] ^= 1;
    } else
      a.push_back(G);
  if (crossed[4])
    if (over(H) || below(H)) {
      if (over(H)) flag[1] ^= 1, flag[8] ^= 1;
      if (below(H)) flag[5] ^= 1, flag[4] ^= 1;
    } else
      a.push_back(H);
  if (flag[1]) a.push_back(A);
  if (flag[2]) a.push_back(B);
  if (flag[3]) a.push_back(C);
  if (flag[4]) a.push_back(D);
  if (flag[5]) a.push_back(AA);
  if (flag[6]) a.push_back(BB);
  if (flag[7]) a.push_back(CC);
  if (flag[8]) a.push_back(DD);
  return work();
}
int main() {
  scanf("%d", &n);
  scanf("%lf%lf", &Hh, &Ff);
  for (int i = 1; i <= n; i++) {
    ++tot;
    scanf("%lf%lf", &l[tot], &r[tot]);
    ans += ((r[tot] - l[tot]) * (Ff + Hh) / (Ff - Hh) + (r[tot] - l[tot])) *
           Hh * 2;
    if (l[i] < -eps && r[i] > eps)
      r[tot + 1] = r[tot], r[tot] = l[tot + 1] = 0, tot++;
  }
  n = tot;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++)
      ans -= calc(point(l[i], Hh), point(r[i], Hh), point(l[j], -Hh),
                  point(r[j], -Hh));
  printf("%.10lf\n", ans);
}