#include <bits/stdc++.h>
using namespace std;
const int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};
long long powmod(long long a, long long b) {
  long long tmp = 1;
  a %= (1000000007);
  for (; b; b >>= 1) {
    if (b & 1) tmp = tmp * a % (1000000007);
    a = a * a % (1000000007);
  }
  return tmp;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
template <class T>
inline void R(T &xx) {
  xx = 0;
  char ch = getchar();
  bool F = 0;
  while ((ch < '0' || ch > '9') && ch != '-') ch = getchar();
  if (ch == '-') F = 1, ch = getchar();
  while (ch >= '0' && ch <= '9')
    xx = xx + xx + (xx << 3) + ch - 48, ch = getchar();
  if (F) xx = -xx;
}
template <class T>
inline void add(int &x, T y) {
  for (x += y; x >= (1000000007); x -= (1000000007))
    ;
}
int n, top;
long long a, b, c, d, st[100111];
struct nod {
  long long x, y;
  inline bool operator<(const nod &b) const {
    return (x == b.x) ? y > b.y : (x < b.x);
  }
} p[100111];
int main() {
  R(n);
  R(a);
  R(b);
  R(c);
  R(d);
  for (int i = 1; i <= n; i++) {
    long long x, y;
    R(x), R(y);
    p[i] = (nod){b * y - a * x, c * x - d * y};
  }
  sort(p + 1, p + 1 + n);
  for (int i = 1; i <= n; i++)
    if (p[i].x > 0 && p[i].y > 0) {
      if (!top || p[i].y > st[top])
        st[++top] = p[i].y;
      else {
        int l = 1, r = top, mid, ans;
        while (l <= r) {
          mid = l + r >> 1;
          if (p[i].y <= st[mid])
            r = mid - 1, ans = mid;
          else
            l = mid + 1;
        }
        st[ans] = p[i].y;
      }
    }
  printf("%d\n", top);
  return 0;
}
