#include <bits/stdc++.h>
using namespace std;
long long n, a, b, c, dd, nrd;
struct punct {
  long long x, y;
} p[100005];
struct dist {
  long long sus, jos;
} d[100005];
bool cmp(dist a, dist b) {
  if (a.sus == b.sus)
    return a.jos > b.jos;
  else
    return a.sus < b.sus;
}
long long lung[100005], nrlung;
int main() {
  int i;
  long double val1, val2;
  char ch;
  cin >> n;
  cin >> a >> ch >> b >> c >> ch >> dd;
  for (i = 1; i <= n; i++) cin >> p[i].x >> p[i].y;
  for (i = 1; i <= n; i++) {
    val1 = (c * p[i].x - dd * p[i].y);
    val2 = (b * p[i].y - a * p[i].x);
    if ((val1 > 0) && (val2 > 0)) {
      nrd++;
      d[nrd].sus = val1;
      d[nrd].jos = val2;
    }
  }
  sort(d + 1, d + nrd + 1, cmp);
  for (i = 1; i <= n; i++)
    if (lung[nrlung] >= d[i].jos) {
      long long poz = lower_bound(lung + 1, lung + nrlung + 1, d[i].jos) - lung;
      lung[poz] = d[i].jos;
    } else {
      nrlung++;
      lung[nrlung] = d[i].jos;
    }
  cout << nrlung;
  return 0;
}
