#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
inline void smin(T &a, U b) {
  if (a > b) a = b;
}
template <typename T, typename U>
inline void smax(T &a, U b) {
  if (a < b) a = b;
}
template <class T>
inline void gn(T &first) {
  char c, sg = 0;
  while (c = getchar(), (c > '9' || c < '0') && c != '-')
    ;
  for ((c == '-' ? sg = 1, c = getchar() : 0), first = 0; c >= '0' && c <= '9';
       c = getchar())
    first = (first << 1) + (first << 3) + c - '0';
  if (sg) first = -first;
}
pair<long long, long long> p[100011];
int n;
int a, b, c, d;
long long arr[100011];
long long dp[100011];
void solve() {
  cin >> n;
  scanf(" %d / %d %d / %d", &a, &b, &c, &d);
  for (int i = 1; i <= n; i++) {
    int u, v;
    gn(u);
    gn(v);
    p[i] = pair<long long, long long>((long long)c * u - (long long)d * v,
                                      (long long)b * v - (long long)a * u);
  }
  sort(p + 1, p + n + 1,
       [&](pair<long long, long long> u, pair<long long, long long> v) {
         if (u.first == v.first) return u.second > v.second;
         return u.first < v.first;
       });
  int nn = 0;
  for (int i = 1; i <= n; i++) {
    arr[nn++] = p[i].second;
    if (p[i].first < 0) arr[nn - 1] = 0;
  }
  int ans = 0;
  for (int i = 0; i <= nn + 2; i++) dp[i] = 1e18;
  for (int i = 0; i < nn; i++) {
    if (arr[i] <= 0) continue;
    int id = lower_bound(dp, dp + nn, arr[i]) - dp;
    dp[id] = arr[i];
    smax(ans, id + 1);
  }
  cout << ans << endl;
}
int main() {
  solve();
  return 0;
}
