#include <bits/stdc++.h>
const int N = 100009;
int n, a, b, c, d, ans;
long long f[N];
std::pair<long long, long long> p[N];
int main() {
  scanf("%d", &n);
  scanf("%d/%d %d/%d", &a, &b, &c, &d);
  b = -b;
  d = -d;
  int m = 0;
  for (int i = 1, x, y; i <= n; ++i) {
    scanf("%d%d", &x, &y);
    x = -x;
    long long cpr1 = 1ll * a * x - 1ll * b * y;
    long long cpr2 = 1ll * c * x - 1ll * d * y;
    if (cpr1 <= 0 || cpr2 >= 0) continue;
    p[++m] = std::pair<long long, long long>(cpr1, cpr2);
  }
  std::sort(p + 1, p + 1 + m);
  for (int i = 1; i <= m; ++i) {
    long long num = -p[i].second;
    int x = std::lower_bound(f + 1, f + 1 + ans, num) - f;
    if (x > ans) ans = x;
    f[x] = num;
  }
  printf("%d\n", ans);
}
