#include <bits/stdc++.h>
using namespace std;
const int N = 100004;
struct point {
  long long x, y;
} p[N];
int n, m = 0, tot, a, b, c, d, v[N], f[N];
long long t[N];
bool operator<(point a, point b) { return (a.x < b.x); }
void update(int x, int y) {
  while (x <= tot) {
    if (y > v[x]) v[x] = y;
    x += (x & (-x));
  }
}
int q(int x) {
  int ret = 0;
  while (x) {
    if (v[x] > ret) ret = v[x];
    x -= (x & (-x));
  }
  return ret;
}
int lis() {
  if (!m) return 0;
  int last = 1, i, ret = 0;
  for (i = 1; i <= tot; i++) v[i] = 0;
  for (i = 1; i <= m; i++) {
    if (p[i].x != p[last].x) {
      for (int j = last; j < i; j++) update(p[j].y, f[j]);
      last = i;
    }
    f[i] = q(p[i].y - 1) + 1;
    if (f[i] > ret) ret = f[i];
  }
  return ret;
}
int main() {
  int i;
  scanf("%d%d", &n, &a);
  char ch = getchar();
  scanf("%d%d", &b, &c);
  ch = getchar();
  scanf("%d", &d);
  for (i = 1; i <= n; i++) {
    long long u, v;
    scanf("%I64d%I64d", &u, &v);
    p[++m].x = v * b - u * a;
    p[m].y = u * c - v * d;
    if ((p[m].x <= 0) || (p[m].y <= 0)) m--;
  }
  sort(p + 1, p + m + 1);
  for (i = 1; i <= m; i++) t[i] = p[i].y;
  sort(t + 1, t + m + 1);
  tot = unique(t + 1, t + m + 1) - t - 1;
  for (i = 1; i <= m; i++) p[i].y = lower_bound(t + 1, t + tot + 1, p[i].y) - t;
  printf("%d\n", lis());
  return 0;
}
