#include <bits/stdc++.h>
#pragma GCC target("avx")
#pragma GCC optimize(3)
#pragma GCC optimize("Ofast")
#pragma GCC optimize("inline")
#pragma GCC optimize("-fgcse")
#pragma GCC optimize("-fgcse-lm")
#pragma GCC optimize("-fipa-sra")
#pragma GCC optimize("-ftree-pre")
#pragma GCC optimize("-ftree-vrp")
#pragma GCC optimize("-fpeephole2")
#pragma GCC optimize("-ffast-math")
#pragma GCC optimize("-fsched-spec")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("-falign-jumps")
#pragma GCC optimize("-falign-loops")
#pragma GCC optimize("-falign-labels")
#pragma GCC optimize("-fdevirtualize")
#pragma GCC optimize("-fcaller-saves")
#pragma GCC optimize("-fcrossjumping")
#pragma GCC optimize("-fthread-jumps")
#pragma GCC optimize("-funroll-loops")
#pragma GCC optimize("-fwhole-program")
#pragma GCC optimize("-freorder-blocks")
#pragma GCC optimize("-fschedule-insns")
#pragma GCC optimize("inline-functions")
#pragma GCC optimize("-ftree-tail-merge")
#pragma GCC optimize("-fschedule-insns2")
#pragma GCC optimize("-fstrict-aliasing")
#pragma GCC optimize("-fstrict-overflow")
#pragma GCC optimize("-falign-functions")
#pragma GCC optimize("-fcse-skip-blocks")
#pragma GCC optimize("-fcse-follow-jumps")
#pragma GCC optimize("-fsched-interblock")
#pragma GCC optimize("-fpartial-inlining")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("-freorder-functions")
#pragma GCC optimize("-findirect-inlining")
#pragma GCC optimize("-fhoist-adjacent-loads")
#pragma GCC optimize("-frerun-cse-after-loop")
#pragma GCC optimize("inline-small-functions")
#pragma GCC optimize("-finline-small-functions")
#pragma GCC optimize("-ftree-switch-conversion")
#pragma GCC optimize("-foptimize-sibling-calls")
#pragma GCC optimize("-fexpensive-optimizations")
#pragma GCC optimize("-funsafe-loop-optimizations")
#pragma GCC optimize("inline-functions-called-once")
#pragma GCC optimize("-fdelete-null-pointer-checks")
using namespace std;
inline int read() {
  int s = 0, w = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') s = s * 10 + ch - '0', ch = getchar();
  return s * w;
}
struct node {
  double x;
  int flag;
} q[350000];
bool cmp(node a, node b) { return a.x > b.x; }
int cnt;
long long cntzero1, cntzero2;
int r[350000], w[350000];
int fir[350000], las[350000];
long long fsum1[350000], fsum2[350000], lsum1[350000], lsum2[350000], ans;
int main() {
  int n, c, d;
  n = read(), c = read(), d = read();
  for (int i = 1; i <= n; i++) {
    r[i] = read(), w[i] = read();
    r[i] -= c, w[i] -= d;
    if (w[i] == 0) {
      r[i] > 0 ? cntzero1++ : cntzero2++;
    } else {
      q[++cnt].x = r[i] * 1.0 / w[i];
      w[i] > 0 ? q[cnt].flag = 1 : q[cnt].flag = -1;
    }
  }
  sort(q + 1, q + cnt + 1, cmp);
  int j;
  for (int i = 1; i <= cnt; i = j + 1) {
    j = i;
    while (j + 1 <= cnt && q[j + 1].x == q[i].x) j++;
    for (int k = i; k <= j; k++) {
      fir[k] = i, las[k] = j;
    }
  }
  for (int i = 1; i <= cnt; i++) {
    fsum1[i] = fsum1[i - 1], fsum2[i] = fsum2[i - 1];
    q[i].flag > 0 ? fsum1[i]++ : fsum2[i]++;
  }
  for (int i = cnt; i >= 1; i--) {
    lsum1[i] = lsum1[i + 1], lsum2[i] = lsum2[i + 1];
    q[i].flag > 0 ? lsum1[i]++ : lsum2[i]++;
  }
  for (int i = 1; i <= cnt; i++) {
    (q[i].flag > 0) ? ans += fsum2[fir[i] - 1] * lsum2[las[i] + 1]
                    : ans += fsum1[fir[i] - 1] * lsum1[las[i] + 1];
  }
  long long num1 = 0, num2 = 0;
  for (int i = 1; i <= cnt; i++) {
    if (q[i].flag > 0)
      num1 += fsum2[fir[i] - 1];
    else
      num2 += fsum1[fir[i] - 1];
  }
  ans += cntzero1 * num1 + cntzero2 * num2;
  printf("%lld\n", ans);
  return 0;
}
