#include <bits/stdc++.h>
using namespace std;
double x[100010], y[100010], X, Y, mem[100010];
int id[100010], len;
int cmp(int i, int j) {
  if (fabs(x[i] - x[j]) > 1e-8) return x[i] < x[j];
  return y[i] > y[j];
}
int main() {
  int n, i, j, k, A, B, C, D;
  scanf("%d %d/%d %d/%d", &n, &A, &B, &C, &D);
  for (i = 0; i < n; i++) {
    scanf("%lf %lf", &X, &Y);
    x[i] = X;
    y[i] = Y;
    if (C && D) x[i] -= Y / C * D;
    if (A && B) y[i] -= X / B * A;
    id[i] = i;
  }
  sort(id, id + n, cmp);
  len = 0;
  for (i = 0; i < n; i++)
    if (x[id[i]] > 0 && y[id[i]] > 0) {
      k = lower_bound(mem, mem + len, y[id[i]] - 1e-8) - mem;
      if (k == len) len++;
      mem[k] = y[id[i]];
    }
  printf("%d\n", len);
  return 0;
}
