#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
template <typename X>
inline bool minimize(X& p, X q) {
  if (p <= q) return 0;
  p = q;
  return 1;
}
template <typename X>
inline bool maximize(X& p, X q) {
  if (p >= q) return 0;
  p = q;
  return 1;
}
const int MAXN = 100005;
struct Point {
  long long x, y;
} pp[MAXN];
bool cmp1(Point a, Point b) {
  if (a.x != b.x) return a.x > b.x;
  return a.y > b.y;
}
bool cmp2(Point a, Point b) { return a.y > b.y; }
inline int lowbit(int x) { return x & (-x); }
int N, arr[MAXN];
inline int query(int x) {
  int res = 0;
  while (x) {
    maximize(res, arr[x]);
    x -= lowbit(x);
  }
  return res;
}
inline void add(int x, int n) {
  while (x <= N) maximize(arr[x], n), x += lowbit(x);
}
int main() {
  int a, b, c, d;
  scanf("%d%d%*c%d%d%*c%d", &N, &a, &b, &c, &d);
  for (int i = 0, x, y; i < N; ++i) {
    scanf("%d%d", &x, &y);
    pp[i].x = (long long)c * x - (long long)d * y;
    pp[i].y = (long long)b * y - (long long)a * x;
    if (pp[i].x <= 0 || pp[i].y <= 0) --i, --N;
  }
  sort(pp, pp + N, cmp2);
  for (int i = 0, j = 1, cnt = 1; i < N; i = j++, ++cnt) {
    while (j < N && pp[j].y == pp[i].y) ++j;
    for (int k = i; k < j; ++k) pp[k].y = cnt;
  }
  sort(pp, pp + N, cmp1);
  int ans = 0;
  for (int i = 0; i < N; ++i) {
    int num = query(pp[i].y - 1) + 1;
    add(pp[i].y, num);
    maximize(ans, num);
  }
  printf("%d\n", ans);
  return 0;
}
