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;
inline int read() {
  int x = 0;
  char ch = getchar();
  bool positive = 1;
  for (; ch < '0' || ch > '9'; ch = getchar())
    if (ch == '-') positive = 0;
  for (; ch >= '0' && ch <= '9'; ch = getchar()) x = x * 10 + ch - '0';
  return positive ? x : -x;
}
const double EPS = 1e-8;
const double PI = 3.1415926535897932384626433832795;
struct POINT {
  double x, y;
  inline POINT(double a = 0, double b = 0) : x(a), y(b) {}
  inline bool operator<(POINT A) const { return x < A.x; }
  inline bool operator>(POINT A) const { return x > A.x; }
  inline bool operator!=(POINT A) const { return x != A.x || y != A.y; }
  inline POINT operator+(POINT A) const { return POINT(x + A.x, y + A.y); }
  inline POINT operator-(POINT A) const { return POINT(x - A.x, y - A.y); }
  inline POINT operator*(double A) const { return POINT(x * A, y * A); }
  inline POINT operator/(double A) const { return POINT(x / A, y / A); }
  inline POINT rotate(double A) const {
    return POINT(x * cos(A) - y * sin(A), x * sin(A) + y * cos(A));
  }
  inline double operator*(POINT A) const { return x * A.x + y * A.y; }
  inline double operator^(POINT A) const { return x * A.y - y * A.x; }
  inline double dist() const { return x * x + y * y; }
  inline double abs() const { return sqrt(x * x + y * y); }
  inline void init() { x = read(), y = read(); }
  inline void out() const { printf("%.9lf %.9lf\n", x, y); }
} null(-123456789, -123456789);
inline POINT cross(POINT A, POINT B, POINT C, POINT D) {
  double s1 = (B - A) ^ (C - A), s2 = (B - A) ^ (D - A);
  return s1 != s2 ? (C * s2 - D * s1) / (s2 - s1) : null;
}
inline POINT min(POINT A, POINT B) { return A < B ? A : B; }
inline POINT max(POINT A, POINT B) { return A > B ? A : B; }
int N, l[505], r[505], h, f;
POINT U0, U1, D0, D1;
vector<POINT> S;
bool cmp(const POINT A, const POINT B) {
  return atan2(A.y, A.x) < atan2(B.y, B.x);
}
inline double calc() {
  if (S.size() <= 2) return 0;
  POINT tmp = 0;
  for (int i = 0; i < S.size(); ++i) tmp = tmp + S[i];
  tmp = tmp / S.size();
  for (int i = S.size() - 1; i >= 0; --i) S[i] = S[i] - tmp;
  sort(S.begin(), S.end(), cmp);
  double ans = 0;
  for (int i = 0; i < S.size(); ++i) ans += S[i] ^ S[(i + 1) % S.size()];
  return abs(ans) / 2;
}
inline double work0(POINT A, POINT B, POINT C) {
  POINT D = cross(A, B, D0, D1), E = cross(A, C, D0, D1);
  S.clear();
  S.push_back(B);
  S.push_back(C);
  S.push_back(D);
  S.push_back(E);
  return calc();
}
inline void add(POINT A) {
  if (A.y <= h && A.y >= -h && A != null) S.push_back(A);
}
inline double work1(POINT A, POINT B, POINT C, POINT D, POINT E, POINT F) {
  S.clear();
  add(cross(A, B, D, E));
  add(cross(A, B, D, F));
  add(cross(A, C, D, E));
  add(cross(A, C, D, F));
  POINT G = cross(D, E, U0, U1), H = cross(D, F, U0, U1);
  POINT L = max(min(B, C), min(G, H)), R = min(max(B, C), max(G, H));
  if (L < R) S.push_back(L), S.push_back(R);
  G = cross(A, B, D0, D1), H = cross(A, C, D0, D1);
  L = max(min(E, F), min(G, H)), R = min(max(E, F), max(G, H));
  if (L < R) S.push_back(L), S.push_back(R);
  return calc();
}
int main() {
  N = read(), h = read(), f = read();
  for (int i = 1; i <= N; ++i) l[i] = read(), r[i] = read();
  U0 = POINT(0, h), U1 = POINT(1, h);
  D0 = POINT(0, -h), D1 = POINT(1, -h);
  double ans = 0;
  for (int i = 1; i <= N; ++i) {
    ans += work0(POINT(0, f), POINT(l[i], h), POINT(r[i], h)) * 2;
    for (int j = 1; j <= N; ++j)
      ans -= work1(POINT(0, f), POINT(l[i], h), POINT(r[i], h), POINT(0, -f),
                   POINT(l[j], -h), POINT(r[j], -h));
  }
  printf("%.10lf\n", ans);
  return 0;
}