#include <bits/stdc++.h>
using namespace std;
const int mm = 400000;
const int mod = 1000000007;
int n, m;
struct node {
  int r, w;
  double rate;
  bool operator<(const node &A) const { return rate < A.rate; }
};
vector<node> rwp, rwn, rwz;
int main() {
  int n, c, d;
  while (cin >> n >> c >> d) {
    rwp.clear();
    rwn.clear();
    rwz.clear();
    for (int i = 0; i < n; i++) {
      int r, w;
      scanf("%d%d", &r, &w);
      r -= c;
      w -= d;
      if (r > 0)
        rwp.push_back((node){r, w, (double)w / r});
      else if (r == 0)
        rwz.push_back((node){r, w, 0});
      else
        rwn.push_back((node){r, w, (double)w / r});
    }
    sort(rwp.begin(), rwp.end());
    sort(rwn.begin(), rwn.end());
    long long ans = 0, pn = 0, np = 0;
    for (int i = 0; i < (int)rwn.size(); i++) {
      long long x = lower_bound(rwp.begin(), rwp.end(), rwn[i]) - rwp.begin();
      np += x;
      long long y = upper_bound(rwp.begin(), rwp.end(), rwn[i]) - rwp.begin();
      ans += x * (rwp.size() - y);
    }
    for (int i = 0; i < (int)rwp.size(); i++) {
      long long x = lower_bound(rwn.begin(), rwn.end(), rwp[i]) - rwn.begin();
      pn += x;
      long long y = upper_bound(rwn.begin(), rwn.end(), rwp[i]) - rwn.begin();
      ans += x * (rwn.size() - y);
    }
    for (int i = 0; i < (int)rwz.size(); i++) {
      if (rwz[i].w > 0) {
        ans += np;
      } else {
        ans += pn;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
