#include <bits/stdc++.h>
using namespace std;
int N, L, Wmax;
long long int answer;
vector<int> leftNegative, leftPositive, rightNegative, rightPositive;
int overlapped;
void input(void) {
  cin >> N >> L >> Wmax;
  for (int i = 0; i < N; ++i) {
    int X, V;
    cin >> X >> V;
    if (X < 0 && X + L > 0) {
      overlapped = V;
    } else if (X < 0) {
      X = -(X + L);
      if (V > 0) {
        leftPositive.push_back(X);
      } else {
        leftNegative.push_back(X);
      }
    } else {
      if (V > 0) {
        rightPositive.push_back(X);
      } else {
        rightNegative.push_back(X);
      }
    }
  }
}
void computeOverlapped(void) {
  if (overlapped == 1) {
    answer += rightNegative.size();
  } else if (overlapped == -1) {
    answer += leftPositive.size();
  }
}
void computeTrivial(void) {
  answer += leftPositive.size() * rightNegative.size();
}
void computeOneSide(const vector<int>& positive, const vector<int>& negative) {
  int j = 0;
  for (int i = 0; i < positive.size(); ++i) {
    while (j < negative.size()) {
      int d = negative[j] - positive[i];
      if (d > 0 && (long long int)(d + L) * Wmax > 2L * positive[i] + d + L) {
        break;
      }
      ++j;
    }
    answer += negative.size() - j;
  }
}
void computeRightSide(void) {
  sort(rightNegative.begin(), rightNegative.end());
  sort(rightPositive.begin(), rightPositive.end());
  computeOneSide(rightPositive, rightNegative);
}
void computeLeftSide(void) {
  sort(leftNegative.begin(), leftNegative.end());
  sort(leftPositive.begin(), leftPositive.end());
  computeOneSide(leftNegative, leftPositive);
}
void compute(void) {
  computeOverlapped();
  computeTrivial();
  computeRightSide();
  computeLeftSide();
}
void output(void) { cout << answer << '\n'; }
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  input();
  compute();
  output();
  return 0;
}
