#include <bits/stdc++.h>
using namespace std;
const int iinf = 1 << 29;
const long long inf = 1ll << 60;
const long long mod = 1e9 + 7;
void GG() {
  cout << "-1\n";
  exit(0);
}
long long mpow(long long a, long long n, long long mo = mod) {
  long long re = 1;
  while (n > 0) {
    if (n & 1) re = re * a % mo;
    a = a * a % mo;
    n >>= 1;
  }
  return re;
}
long long inv(long long b) {
  return b == 1 ? 1 : (mod - mod / b) * inv(mod % b) % mod;
}
const int maxn = 2e5 + 5;
long long A, B, C, D, n;
int second[maxn * 4];
int QU(int L, int R, int o = 1, int l = 0, int r = n * 2 + 1) {
  if (l > R || r < L) return 0;
  if (l >= L && r <= R) return second[o];
  int mid = (l + r) / 2;
  return max(QU(L, R, o * 2, l, mid), QU(L, R, o * 2 + 1, mid + 1, r));
}
void MO(int p, int v, int o = 1, int l = 0, int r = n * 2 + 1) {
  if (l > p || r < p) return;
  if (l == r) {
    second[o] = max(second[o], (__typeof__(second[o]))(v));
    return;
  }
  int mid = (l + r) / 2;
  MO(p, v, o * 2, l, mid);
  MO(p, v, o * 2 + 1, mid + 1, r);
  second[o] = max(second[o * 2], second[o * 2 + 1]);
}
struct Ev {
  bool TP;
  long long p, id;
};
signed main() {
  scanf("%lld\n%lld/%lld %lld/%lld", &n, &A, &B, &C, &D);
  vector<Ev> v;
  vector<long long> start(n + 1);
  long long BB = 2e10;
  for (int i = (0); i < (n); ++i) {
    long long x, y;
    scanf("%lld%lld", &x, &y);
    ;
    v.push_back({0, -A * x + B * y, i});
    v.push_back({1, -C * x + D * y + BB, i});
    start[i] = -A * x + B * y;
  }
  v.push_back({0, 0, n});
  v.push_back({1, 0ll + BB, n});
  start[n] = 0;
  sort(v.begin(), v.end(), [&](Ev a, Ev b) {
    return a.p != b.p ? a.p < b.p : start[a.id] < start[b.id];
  });
  vector<long long> tmp;
  for (int i = (0); i < ((int)v.size()); ++i) {
    tmp.push_back(v[i].p);
  }
  (sort(tmp.begin(), tmp.end()),
   tmp.resize(distance(tmp.begin(), unique(tmp.begin(), tmp.end()))));
  for (int i = (0); i < ((int)v.size()); ++i) {
    if (v[i].TP == 0) {
    } else {
      ;
      int st =
          lower_bound(tmp.begin(), tmp.end(), start[v[i].id]) - tmp.begin();
      int en = lower_bound(tmp.begin(), tmp.end(), v[i].p) - tmp.begin();
      long long Q = QU(st + 1, en - 1);
      MO(st, Q + 1);
      ;
      if (v[i].id == n) {
        printf("%d\n", Q);
        return 0;
      }
    }
  }
}
