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;
struct line {
  int l, r;
} p[510], q[510];
struct Point {
  long double x, y;
} Q[10], tmp[10];
int vis[10];
long double A, B, C;
int n, H, F, tot, cnt;
void read(int &x) {
  char ch = getchar();
  int mark = 1;
  for (; ch != '-' && (ch < '0' || ch > '9'); ch = getchar())
    ;
  if (ch == '-') mark = -1, ch = getchar();
  for (x = 0; ch >= '0' && ch <= '9'; ch = getchar()) x = x * 10 + ch - 48;
  x *= mark;
}
inline bool cmp(line a, line b) {
  if (a.l == b.l) return a.r > b.r;
  return a.l < b.l;
}
inline long double Get(long double x, long double y) {
  return A * x + B * y + C;
}
inline long double Abs(long double x) {
  if (x < 0) return -x;
  return x;
}
inline long double dis(Point X, long double A, long double B, long double C) {
  return Abs(X.x * A + X.y * B + C) / sqrt(A * A + B * B);
}
inline long double Getsum(long double x1, long double y1, long double x2,
                          long double y2) {
  return x1 * y2 - x2 * y1;
}
Point Getp(Point X, Point Y, long double A, long double B, long double C) {
  long double d1 = dis(X, A, B, C), d2 = dis(Y, A, B, C);
  Point Ans;
  Ans.x = (d2 * X.x + d1 * Y.x) / (d1 + d2);
  Ans.y = (d2 * X.y + d1 * Y.y) / (d1 + d2);
  return Ans;
}
void solve() {
  int tot = 0;
  int s1 = 0, s2 = 0;
  for (int k = 1; k <= cnt; k++) {
    double t = Get(Q[k].x, Q[k].y);
    if (t == 0)
      vis[k] = -1, s2++;
    else if (t > 0)
      vis[k] = 1, s1++;
    else
      vis[k] = -1, s2++;
  }
  if (s1 == 0) {
    cnt = 0;
    return;
  } else if (s2 == 0)
    return;
  Q[cnt + 1] = Q[1];
  vis[cnt + 1] = vis[1];
  for (int i = 1; i <= cnt; i++) {
    if (vis[i] == 1) tmp[++tot] = Q[i];
    if (vis[i] * vis[i + 1] < 0) {
      tmp[++tot] = Getp(Q[i], Q[i + 1], A, B, C);
    }
  }
  cnt = tot;
  for (int i = 1; i <= cnt; i++) Q[i] = tmp[i];
}
int main() {
  read(n);
  read(H);
  read(F);
  for (int i = 1; i <= n; i++) read(p[i].l), read(p[i].r);
  sort(p + 1, p + n + 1, cmp);
  q[++tot] = p[1];
  for (int i = 2; i <= n; i++) {
    if (p[i].l > q[tot].r)
      q[++tot] = p[i];
    else
      q[tot].r = max(q[tot].r, p[i].r);
  }
  long double sum = 0;
  for (int i = 1; i <= tot; i++) {
    long double d = (long double)(F + H) / (F - H) * (q[i].r - q[i].l);
    sum += (d + q[i].r - q[i].l) * H * 2;
  }
  for (int i = 1; i <= tot; i++) {
    for (int j = 1; j <= tot; j++) {
      cnt = 4;
      Q[1].x = q[i].l;
      Q[1].y = -H;
      Q[2].x = q[i].r;
      Q[2].y = -H;
      Q[3].x = (long double)(F + H) / (F - H) * q[i].r;
      Q[3].y = H;
      Q[4].x = (long double)(F + H) / (F - H) * q[i].l;
      Q[4].y = H;
      A = H - F;
      B = -q[j].l;
      C = F * q[j].l;
      A = -A;
      B = -B;
      C = -C;
      solve();
      if (cnt <= 2) continue;
      A = H - F;
      B = -q[j].r;
      C = F * q[j].r;
      solve();
      if (cnt <= 2) continue;
      long double over = 0;
      for (int k = 2; k < cnt; k++)
        over += Getsum(Q[k].x - Q[1].x, Q[k].y - Q[1].y, Q[k + 1].x - Q[1].x,
                       Q[k + 1].y - Q[1].y) /
                2;
      sum -= over;
    }
  }
  printf("%.7lf\n", (double)sum);
  return 0;
}