#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a > b) return gcd(b, a);
  if (b % a == 0) return a;
  return gcd(b % a, a);
}
int main() {
  int n, x, y;
  set<pair<int, int> > a;
  while (scanf("%d %d %d", &n, &x, &y) != EOF) {
    for (int i = 0; i < n; i++) {
      int p, q;
      scanf("%d %d", &p, &q);
      p -= x, q -= y;
      if (p == 0)
        a.insert(make_pair(0, 1));
      else if (q == 0)
        a.insert(make_pair(1, 0));
      else {
        int t = gcd(abs(p), abs(q));
        p /= t;
        q /= t;
        if (p < 0) {
          p = -p;
          q = -q;
        }
        a.insert(make_pair(p, q));
      }
    }
    printf("%d\n", a.size());
  }
  return 0;
}
