#include <bits/stdc++.h>
const int maxn = 111111;
using namespace std;
struct node {
  int x, y;
  long long p, q;
  friend bool operator<(const node &a, const node &b) {
    return a.q > b.q || (a.q == b.q && a.p > b.p);
  }
} s[maxn];
int f[maxn];
long long x[maxn];
int a, b, c, d;
int n, xn;
struct bit {
  int B[maxn];
  int _n;
  void init(int n) {
    _n = n;
    for (int i = 0; i <= n; i++) B[i] = -10000;
  }
  void ins(int p, int v) {
    for (; p <= _n; p += (p & (-p))) B[p] = max(B[p], v);
  }
  int ask(int p) {
    int ret = -100000;
    for (; p; p -= (p & (-p))) ret = max(ret, B[p]);
    return ret;
  }
} T;
int main() {
  scanf("%d", &n);
  scanf("%d/%d", &a, &b);
  scanf("%d/%d", &c, &d);
  xn = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &s[i].x, &s[i].y);
    s[i].p = (long long)b * s[i].y - (long long)a * s[i].x;
    s[i].q = (long long)d * s[i].y - (long long)c * s[i].x;
    x[xn++] = s[i].p;
  }
  s[n].x = s[n].y = s[n].p = s[n].q = 0;
  x[xn++] = 0;
  ++n;
  sort(s, s + n);
  sort(x, x + xn);
  xn = unique(x, x + xn) - x;
  T.init(xn);
  int ans = 0;
  for (int i = 0; i < n; i++) {
    int xp = upper_bound(x, x + xn, s[i].p) - x;
    if (s[i].x == 0 && s[i].y == 0) {
      T.ins(xp, 0);
      continue;
    }
    f[i] = T.ask(xp - 1) + 1;
    if (f[i] < 0) continue;
    T.ins(xp, f[i]);
    if (f[i] > ans) ans = f[i];
  }
  printf("%d\n", ans);
  return 0;
}
