#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
int n, a, b, c, d;
long long san[300030], cnt;
int dp[300030];
struct node {
  int x, y;
  bool operator<(const node &t) const {
    long long u = 1LL * c * x - 1LL * d * y;
    long long v = 1LL * c * t.x - 1LL * d * t.y;
    if (u != v) return u > v;
    return 1LL * a * x - 1LL * b * y > 1LL * a * t.x - 1LL * b * t.y;
  }
} p[300030];
int mx[300030];
void upd(int x, int v) {
  while (x <= cnt) {
    mx[x] = max(mx[x], v);
    x += x & -x;
  }
}
int query(int x) {
  int ret = 0;
  while (x) {
    ret = max(ret, mx[x]);
    x -= x & -x;
  }
  return ret;
}
int haxi(long long x) { return lower_bound(san + 1, san + cnt + 1, x) - san; }
int main() {
  scanf("%d", &n);
  scanf("%d/%d%d/%d", &a, &b, &c, &d);
  for (int i = 1; i <= n; ++i) {
    scanf("%d%d", &p[i].x, &p[i].y);
    san[++cnt] = 1LL * a * p[i].x - 1LL * b * p[i].y;
  }
  n++;
  p[n].x = 0, p[n].y = 0;
  san[++cnt] = 0;
  sort(p + 1, p + n + 1);
  sort(san + 1, san + cnt + 1);
  cnt = unique(san + 1, san + cnt + 1) - san - 1;
  for (int i = 1; i <= n; ++i) {
    long long tmp = 1LL * a * p[i].x - 1LL * b * p[i].y;
    int pp = haxi(tmp);
    dp[i] = query(pp - 1) + 1;
    upd(pp, dp[i]);
  }
  for (int i = 1; i <= n; ++i) {
    if (p[i].x == 0 && p[i].y == 0) {
      printf("%d\n", dp[i] - 1);
      break;
    }
  }
  return 0;
}
