#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
const int N = 101000;
int n, a, b, c, d, m, tot;
long long x, y, f[N];
pair<long long, long long> p[N];
bool cmp(const pair<long long, long long> &a,
         const pair<long long, long long> &b) {
  return make_pair(a.first, -a.second) < make_pair(b.first, -b.second);
}
int main() {
  scanf("%d", &n);
  scanf("%d/%d %d/%d", &a, &b, &c, &d);
  tot = 0;
  for (int i = 0; i < n; i++) {
    scanf("%I64d%I64d", &x, &y);
    long long px = y * b - a * x, py = c * x - y * d;
    if (px >= 0 && py >= 0) p[tot++] = make_pair(px, py);
  }
  p[tot] = make_pair(0, 0);
  sort(p, p + tot + 1, cmp);
  m = 0;
  for (int i = 0; i < tot + 1; i++) f[i] = 0;
  for (int i = tot + 1 - 1; i >= 0; i--) {
    int j = lower_bound(f + 1, f + m + 1, -p[i].second) - f;
    f[j] = -p[i].second;
    m = max(m, j);
  }
  printf("%d\n", m - 1);
}
