#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
inline void smin(T &a, const U &b) {
  if (a > b) a = b;
}
template <typename T, typename U>
inline void smax(T &a, const 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;
}
template <class T1, class T2>
inline void gn(T1 &x1, T2 &x2) {
  gn(x1), gn(x2);
}
template <class T1, class T2, class T3>
inline void gn(T1 &x1, T2 &x2, T3 &x3) {
  gn(x1, x2), gn(x3);
}
template <class T>
inline void print(T first) {
  if (first < 0) {
    putchar('-');
    return print(-first);
  }
  if (first < 10) {
    putchar('0' + first);
    return;
  }
  print(first / 10);
  putchar(first % 10 + '0');
}
template <class T>
inline void println(T first) {
  print(first);
  putchar('\n');
}
template <class T>
inline void printsp(T first) {
  print(first);
  putchar(' ');
}
template <class T1, class T2>
inline void print(T1 x1, T2 x2) {
  printsp(x1), println(x2);
}
template <class T1, class T2, class T3>
inline void print(T1 x1, T2 x2, T3 x3) {
  printsp(x1), printsp(x2), println(x3);
}
int power(int a, int b, int m, int ans = 1) {
  for (; b; b >>= 1, a = (long long)a * a % m)
    if (b & 1) ans = (long long)ans * a % m;
  return ans;
}
long long a, b, c, d;
long long arr[100010];
int n, nn, B[100010];
struct point {
  long long first, second, mn, mx;
  int flag;
  point(long long first = 0, long long second = 0, long long mn = 0,
        long long mx = 0, int flag = 0)
      : first(first), second(second), mn(mn), mx(mx), flag(flag) {}
  point operator-(point a) { return point(first - a.first, second - a.second); }
  point operator+(point a) { return point(first + a.first, second + a.second); }
  point operator*(int a) { return point(first * a, second * a); }
  point operator/(int a) { return point(first / a, second / a); }
  point operator&(point a) {
    return point(first * a.first - second * a.second,
                 first * a.second + second * a.first);
  }
  point rotate(double al) { return *this & point(cos(al), sin(al)); }
  long long operator^(point a) {
    return 1LL * first * a.second - 1LL * second * a.first;
  }
  long long operator*(point a) {
    return 1LL * first * a.first + 1LL * second * a.second;
  }
  point conj() { return point(-second, first); }
  double nor() { return sqrt(*this * *this); }
  long long nor2() { return *this * *this; }
  double al() { return atan2(second, first); }
  bool operator<(const point &a) const {
    if (first != a.first) return first < a.first;
    return second < a.second;
  }
  bool operator>(const point &a) const {
    if (first != a.first) return first > a.first;
    return second > a.second;
  }
  bool operator==(const point &a) const {
    return (first == a.first && second == a.second);
  }
  bool operator!=(const point &a) const {
    return (first != a.first || second != a.second);
  }
  void input() {
    gn(first, second);
    mn = a * first - b * second;
    mx = c * first - d * second;
    if (mn < 0 && mx > 0) flag = 1;
    arr[nn++] = mx;
  }
  void print() { printf("%I64d %I64d\n", first, second); }
} p[100010];
bool cmp(point A, point B) {
  if (A.mn == B.mn) return A.mx < B.mx;
  return A.mn < B.mn;
}
void update(int u, int first) {
  for (; u; u -= u & -u) smax(B[u], first);
}
int calc(int u, int ans = 0) {
  for (; u < n + 3; u += u & -u) smax(ans, B[u]);
  return ans;
}
int main() {
  scanf("%d %I64d/%I64d %I64d/%I64d", &n, &a, &b, &c, &d);
  for (int i = 0; i < n; i++) p[i].input();
  sort(p, p + n, cmp);
  arr[nn++] = 0x3f3f3f3f;
  sort(arr, arr + nn);
  nn = unique(arr, arr + nn) - arr;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    int id = lower_bound(arr, arr + nn, p[i].mx) - arr;
    int num = calc(id + 1);
    if (p[i].flag) smax(ans, num + 1);
    update(id, num + 1);
  }
  println(ans);
}
