#include <bits/stdc++.h>
using namespace std;
int n, m, a1, a2, b1, b2, ans, t[400005];
long long b[100005];
struct node {
  long long x, y;
} a[100005];
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') f = -1;
  for (; isdigit(ch); ch = getchar()) x = (x + (x << 2) << 1) + (ch ^ 48);
  return x * f;
}
bool cmp(const node &x, const node &y) {
  if (x.y != y.y) return x.y < y.y;
  return x.x < y.x;
}
int query(int i, int l, int r, int x, int y) {
  if (x <= l && y >= r) return t[i];
  int mid = l + r >> 1;
  if (y <= mid) return query(i << 1, l, mid, x, y);
  if (x > mid) return query(i << 1 | 1, mid + 1, r, x, y);
  return max(query(i << 1, l, mid, x, y), query(i << 1 | 1, mid + 1, r, x, y));
}
void mdf(int i, int l, int r, int x, int y) {
  t[i] = max(t[i], y);
  if (l == r) return;
  int mid = l + r >> 1;
  if (x <= mid)
    mdf(i << 1, l, mid, x, y);
  else
    mdf(i << 1 | 1, mid + 1, r, x, y);
}
int main() {
  n = read(), a1 = read(), b1 = read(), a2 = read(), b2 = read();
  for (int i = 1; i <= n; i++) {
    int x = read(), y = read();
    b[i] = a[i].x = (long long)y * b2 - (long long)x * a2,
    a[i].y = (long long)y * b1 - (long long)x * a1;
  }
  sort(b + 1, b + n + 2), m = unique(b + 1, b + n + 2) - b - 1,
                          sort(a + 1, a + n + 1, cmp),
                          memset(t, -63, sizeof(t)),
                          mdf(1, 1, m, lower_bound(b + 1, b + m + 1, 0) - b, 0);
  for (int i = 1; i <= n; i++) {
    if (a[i].y <= 0) continue;
    a[i].x = lower_bound(b + 1, b + m + 1, a[i].x) - b;
    int x = a[i].x == m ? -0x3f3f3f3f : query(1, 1, m, a[i].x + 1, m) + 1;
    ans = max(ans, x), mdf(1, 1, m, a[i].x, x);
  }
  printf("%d", ans);
  return 0;
}
