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.
#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
template <class T>
T sqr(T x) {
  return x * x;
}
template <class T>
T alex(T x) {
  return (x > 0) ? x : -x;
}
template <class T>
void read(T& x) {
  x = 0;
  T f = 1;
  char ch = getchar();
  while ((ch < 48 || ch > 57) && ch != 45) ch = getchar();
  if (ch == 45) f = -1, ch = getchar();
  while (ch >= 48 && ch <= 57) x = x * 10 + ch - 48, ch = getchar();
  x *= f;
}
int sign(double x) {
  if (fabs(x) < 1e-9) return 0;
  if (x > 1e-9)
    return 1;
  else
    return -1;
}
struct Point {
  double x, y;
  Point() {}
  Point(double x, double y) : x(x), y(y) {}
  Point operator+(const Point& p) const { return Point(x + p.x, y + p.y); }
  Point operator-(const Point& p) const { return Point(x - p.x, y - p.y); }
  Point operator*(const double& d) const { return Point(x * d, y * d); }
  double operator^(const Point& p) const { return x * p.y - y * p.x; }
  double operator*(const Point& p) const { return x * p.x + y * p.y; }
  void print() { printf("%lf %lf\n", x, y); }
};
struct Line {
  Point s, v;
  double angle;
  Line() {}
  Line(Point s, Point v) : s(s), v(v) { angle = atan2(v.y, v.x); }
  bool operator<(const Line& l) const {
    return (sign(angle - l.angle) == 0) ? sign((l.s - s) ^ v) == 1
                                        : angle < l.angle;
  }
  void print() { printf("(%lf %lf)(%lf %lf)\n", s.x, s.y, v.x, v.y); }
};
int n, h, f;
int l[505], r[505];
double res;
Line que[505];
Point pnt[505];
Point inter(Line l1, Line l2) {
  double lambda = ((l2.s - l1.s) ^ l2.v) / (l1.v ^ l2.v);
  return l1.s + l1.v * lambda;
}
bool onleft(Point p, Line l) { return sign((p - l.s) ^ l.v) <= 0; }
vector<Point> HPI(vector<Line> l) {
  vector<Point> res;
  res.clear();
  sort(l.begin(), l.end());
  vector<Line> _l;
  _l.push_back(l[0]);
  for (int i = (1); i < (l.size()); i++)
    if (sign(l[i].angle - l[i - 1].angle) != 0) _l.push_back(l[i]);
  int head, tail;
  que[head = tail = 1] = _l[0];
  que[++tail] = _l[1];
  pnt[1] = inter(que[1], que[2]);
  for (int i = (2); i < (_l.size()); i++) {
    while (head < tail && !onleft(pnt[tail - 1], _l[i])) tail--;
    while (head < tail && !onleft(pnt[head], _l[i])) head++;
    pnt[tail] = inter(que[tail], _l[i]);
    que[++tail] = _l[i];
  }
  while (head < tail && !onleft(pnt[tail - 1], que[head])) tail--;
  while (head < tail && !onleft(pnt[head], que[tail])) head++;
  pnt[tail] = inter(que[head], que[tail]);
  for (int i = (head); i <= (tail); i++) res.push_back(pnt[i]);
  return res;
}
double getarea(vector<Point> p) {
  double res = 0.0;
  for (int i = (2); i < (p.size()); i++)
    res += (p[i] - p[0]) ^ (p[i] - p[i - 1]);
  return fabs(res) / 2.0;
}
int main() {
  read(n);
  read(h);
  read(f);
  for (int i = (1); i <= (n); i++) {
    read(l[i]), read(r[i]);
    res += 4.0 * (r[i] - l[i]) * f * h / (f - h);
  }
  for (int i = (1); i <= (n); i++)
    for (int j = (i); j <= (n); j++) {
      vector<Line> line;
      line.clear();
      Point a, b, c, d;
      a = Point(l[i], h);
      b = Point(1.0 * l[i] * (f + h) / (f - h), -h);
      c = Point(1.0 * r[i] * (f + h) / (f - h), -h);
      d = Point(r[i], h);
      line.push_back(Line(a, b - a));
      line.push_back(Line(b, c - b));
      line.push_back(Line(c, d - c));
      line.push_back(Line(d, a - d));
      a = Point(l[j], -h);
      b = Point(r[j], -h);
      c = Point(1.0 * r[j] * (f + h) / (f - h), h);
      d = Point(1.0 * l[j] * (f + h) / (f - h), h);
      line.push_back(Line(a, b - a));
      line.push_back(Line(b, c - b));
      line.push_back(Line(c, d - c));
      line.push_back(Line(d, a - d));
      double ans = getarea(HPI(line));
      if (i == j)
        res -= ans;
      else
        res -= 2 * ans;
    }
  printf("%lf\n", res);
}
