#include <bits/stdc++.h>
int n;
int A, B, C, D;
long long X[100005], Y[100005], Y1[100005];
int ids[100005];
int _Y[100005];
inline bool cmp(int i, int j) {
  return X[i] < X[j] || (!(X[j] < X[i]) && _Y[i] > _Y[j]);
}
int T[100005];
inline int que(int x) {
  int ret = 0;
  while (x) {
    ret = T[x] > ret ? T[x] : ret;
    x -= x & -x;
  }
  return ret;
}
inline void mod(int x, int val) {
  while (x <= n) {
    T[x] = T[x] > val ? T[x] : val;
    x += x & -x;
  }
}
int main() {
  scanf("%d", &n);
  scanf("%d/%d %d/%d", &A, &B, &C, &D);
  int i;
  int cnt = 0;
  for (i = 1; i <= n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    if (A == 0) A = 1, B = 233333;
    if (D == 0) C = 233333, D = 1;
    long long _x = 1LL * C * x - 1LL * D * y;
    long long _y = 1LL * B * y - 1LL * A * x;
    if (_x > 0 && _y > 0) {
      X[++cnt] = _x;
      Y[cnt] = _y;
    }
  }
  int ans = 0;
  if (cnt) {
    memcpy(Y1 + 1, Y + 1, cnt * sizeof(long long));
    std::sort(Y1 + 1, Y1 + cnt + 1);
    for (i = 1; i <= cnt; i++)
      _Y[i] = std::lower_bound(Y1 + 1, Y1 + cnt + 1, Y[i]) - Y1, ids[i] = i;
    std::sort(ids + 1, ids + cnt + 1, cmp);
    for (i = 1; i <= cnt; i++) {
      int y = _Y[ids[i]];
      int t = que(y - 1) + 1;
      mod(y, t);
      if (t > ans) ans = t;
    }
  }
  printf("%d\n", ans);
}
