#include <bits/stdc++.h>
using namespace std;
struct my_type {
  long long x, y;
  my_type(long long _x = 0, long long _y = 0) {
    x = _x;
    y = _y;
  }
};
bool operator<(const my_type &a, const my_type &b) {
  return (a.x < b.x) || (a.x == b.x && a.y > b.y);
}
int n, A, B, C, D, i, res;
my_type a[111111];
long long b[111111];
int main() {
  scanf("%d\n%d/%d %d/%d\n", &n, &B, &A, &D, &C);
  if ((long long)A * D == (long long)B * C) {
    printf("0\n");
    return 0;
  }
  for (i = 0; i < n; i++) {
    scanf("%I64d%I64d", &a[i].x, &a[i].y);
    a[i] = my_type(D * a[i].x - C * a[i].y, -B * a[i].x + A * a[i].y);
  }
  sort(a, a + n);
  for (i = 1; i <= n; i++) b[i] = 1000000000000000LL;
  for (i = 0; i < n; i++)
    if (a[i].x > 0 && a[i].y > 0) {
      int index = lower_bound(b, b + n + 1, (long long)a[i].y) - b;
      b[index] = a[i].y;
      if (res < index) res = index;
      res = max(res, index);
    }
  printf("%d\n", res);
  return 0;
}
