#include <bits/stdc++.h>
using namespace std;
const int N = 100000 + 5;
int n;
long long pa, pb, pc, pd;
long long an[N], bn[N];
inline bool cmp_nid_a_b(int a, int b) {
  if (an[a] != an[b])
    return an[a] < an[b];
  else
    return bn[a] > bn[b];
}
int od[N];
long long mn[N];
int main() {
  scanf("%d", &n);
  scanf("%I64d/%I64d %I64d/%I64d\n", &pa, &pb, &pc, &pd);
  pa = -pa;
  pd = -pd;
  for (int i = 1; i <= n; ++i) {
    long long x, y;
    scanf("%I64d%I64d", &x, &y);
    an[i] = x * pa + y * pb;
    bn[i] = x * pc + y * pd;
  }
  for (int i = 1; i <= n; ++i) od[i] = i;
  sort(od + 1, od + n + 1, cmp_nid_a_b);
  memset(mn, 0x3f, sizeof(mn));
  mn[0] = 0;
  int anslen = 0;
  for (int it = 1; it <= n; ++it) {
    int i = od[it];
    int len = (int)(lower_bound(mn, mn + n, bn[i]) - mn);
    bool can = (an[i] > 0 && bn[i] > 0);
    if (len > 1 || can) anslen = max(anslen, len);
    if (can) mn[len] = bn[i];
  }
  printf("%d\n", anslen);
  return 0;
}
