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;
struct note {
  double x, y;
  void read() { scanf("%lf%lf", &x, &y); }
  note(double X = 0, double Y = 0) : x(X), y(Y) {}
  note operator-(note A) { return note(x - A.x, y - A.y); }
  note operator+(note A) { return note(x + A.x, y + A.y); }
  note operator*(double a) { return note(x * a, y * a); }
  note operator/(double a) { return note(x / a, y / a); }
  bool operator==(note A) { return abs(x - A.x) < eps && abs(y - A.y) < eps; }
} A, B, C, D, O, a[2005], b[2005], c[2005], d[2005];
double e[9], ans;
int type[2005], p[9], n, m, x, y, H, F;
vector<note> f, g;
double xot(note A, note B) { return A.x * B.y - A.y * B.x; }
bool cross(note &O) {
  double s1 = xot(C - A, B - A), s2 = xot(C - A, D - A);
  if (abs(s1 - s2) < eps) return 0;
  O = (D * s1 - B * s2) / (s1 - s2);
  return 1;
}
void ins(note A, int flag) {
  if (flag) {
    g.push_back(A);
    return;
  }
  int n = f.size();
  for (int i = 0; i < n; i++)
    if (A == f[i]) {
      f.erase(f.begin() + i);
      return;
    }
  f.push_back(A);
}
bool cmp(const int i, const int j) { return e[i] < e[j]; }
double angle(note A) { return atan2(A.y, A.x); }
void work(int i, int j, int flag) {
  f.clear(), g.clear();
  for (int k = 0; k < 4; k++) {
    if (k & 1)
      C = a[i];
    else
      C = b[i];
    if (k > 1)
      D = c[j];
    else
      D = d[j];
    if (!cross(O)) continue;
    if (O.y > H)
      ins(C, 0), ins(note(D.x / (F - H) * (F + H), H), 0);
    else if (O.y < -H)
      ins(D, 0), ins(note(C.x / (F - H) * (F + H), -H), 0);
    else
      ins(O, 1);
  }
  int n = g.size();
  for (int i = 0; i < n; i++) {
    int flag = 1;
    for (int j = 0; j < f.size(); j++)
      if (g[i] == f[j]) flag = 0;
    if (flag) f.push_back(g[i]);
  }
  n = f.size();
  if (!n) return;
  double res = 0;
  for (int i = 1; i < n; i++)
    if (f[i].x < f[0].x) swap(f[i], f[0]);
  for (int i = 1; i < n; i++) e[i] = angle(f[i] - f[0]), p[i] = i;
  sort(p + 1, p + n, cmp), p[0] = p[n] = 0;
  for (int i = 0; i < n; i++) res += xot(f[p[i]], f[p[i + 1]]);
  ans -= abs(res) / (flag + 1);
}
void add(int x, int y) {
  ans += 2. * H * (y - x) * (1 + 1. * (F + H) / (F - H));
  a[m] = note(x, H), b[m] = note(y, H), c[m] = note(x, -H), d[m] = note(y, -H),
  type[m++] = x >= 0;
}
int main() {
  scanf("%d%d%d", &n, &H, &F), A = note(0, F), B = note(0, -F);
  for (int i = 0; i < n; i++)
    scanf("%d%d", &x, &y), x<0 && y> 0 ? (add(x, 0), add(0, y)) : add(x, y);
  for (int i = 0; i < m; i++)
    for (int j = i; j < m; j++)
      if (type[i] == type[j]) work(i, j, i == j);
  printf("%.9lf\n", ans);
  return 0;
}