#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
inline void smin(T &a, U b) {
  if (a > b) a = b;
}
template <typename T, typename U>
inline void smax(T &a, U b) {
  if (a < b) a = b;
}
long double al[800100];
const long double pi = acosl(-1.0);
int main() {
  int n, c, d, a, b;
  scanf("%d%d%d", &n, &c, &d);
  for (int i = 0; i < n; i++)
    scanf("%d%d", &a, &b),
        al[i] = atan2l((long double)(b - d), (long double)(a - c));
  sort(al, al + n);
  for (int i = 0; i < n + 1; i++) al[i + n] = al[i] + 2 * pi;
  int j = 0, k = 0;
  long long ans = (long long)n * (n - 1) / 2 * (n - 2) / 3;
  for (int i = 0; i < n; i++) {
    while (al[j + 1] - al[i] < pi + 1e-18) j++;
    while (al[k] - al[i] < pi - 1e-18) k++;
    ans -= (long long)(j - i) * (j - i - 1) / 2;
    ans += (long long)(j - k) * (j - k + 1) / 2;
  }
  cout << ans << endl;
  return 0;
}
