#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch > '9' || ch < '0') ch == '-' && (f = 0) || (ch = getchar());
  while (ch <= '9' && ch >= '0')
    x = (x << 3) + (x << 1) + ch - '0', ch = getchar();
  return f ? x : -x;
}
int id[100020];
long long xs[100020], ys[100020];
bool cmp(const int &a, const int &b) {
  return xs[a] == xs[b] ? ys[a] > ys[b] : xs[a] < xs[b];
}
long long mx[100020], len;
int main(int argc, char const *argv[]) {
  int n = read();
  long long a = read(), b = read(), c = read(), d = read();
  for (int i = 1; i <= n; ++i) {
    long long x = read(), y = read();
    xs[i] = c * x - d * y;
    ys[i] = b * y - a * x;
    id[i] = i;
    if (xs[i] <= 0 || ys[i] <= 0) --n, --i;
  }
  sort(id + 1, id + n + 1, cmp);
  for (int i = 1; i <= n; i++) {
    long long y = ys[id[i]];
    if (y > mx[len])
      mx[++len] = y;
    else
      *lower_bound(mx + 1, mx + len + 1, y) = y;
  }
  cout << len << endl;
  return 0;
}
