#include <bits/stdc++.h>
const static long long INF = 0x3f3f3f3f3f3f3f3f;
static inline void setio(void);
static long double closest(const long long& pos, const long long& speed,
                           const long long& wmax) {
  assert(pos >= 0 && speed > 0);
  const long long my_max_velocity = speed - wmax;
  const long long other_max_velocity = -speed - wmax;
  const long double shortest_time_to_origin =
      static_cast<long double>(pos) / my_max_velocity;
  return shortest_time_to_origin * other_max_velocity;
}
int main(void) {
  setio();
  long long n, l, wmax;
  std::cin >> n >> l >> wmax;
  std::vector<std::pair<long long, long long> > vec(n);
  for (auto& e : vec) std::cin >> e.first >> e.second;
  std::vector<std::pair<long long, long long> > toward, away;
  long long nc = 0;
  while (!vec.empty()) {
    if ((vec.back().first & (1LL << 63)) != (vec.back().second & (1LL << 63)) ||
        vec.back().first < 0 && vec.back().first + l > 0) {
      toward.push_back(vec.back());
      nc += vec.back().second < 0;
    } else {
      away.push_back(vec.back());
    }
    vec.pop_back();
  }
  long long ans = nc * (toward.size() - nc);
  const auto cmp = [](const std::pair<long long, long long>& a,
                      const std::pair<long long, long long>& b) {
    return a.first < b.first;
  };
  std::sort(toward.begin(), toward.end(), cmp);
  if (wmax > 1) {
    for (const auto& e : away) {
      if (e.second > 0) {
        const long long dist = std::floor(closest(e.first, e.second, wmax)) - l;
        const auto it = std::upper_bound(toward.begin(), toward.end(),
                                         std::make_pair(dist, 0), cmp);
        ans += std::distance(it, toward.end());
      } else {
        const long long dist =
            -std::floor(closest(-(e.first + l), -e.second, wmax));
        const auto it = std::lower_bound(toward.begin(), toward.end(),
                                         std::make_pair(dist, 0), cmp);
        ans += std::distance(toward.begin(), it);
      }
    }
  }
  std::cout << ans << "\n";
  return 0;
}
static inline void setio(void) {
  std::ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  std::cout.precision(10);
  std::cout << std::fixed;
}
