#include <bits/stdc++.h>
using namespace std;
int n, res;
pair<long long int, long long int> p[111111];
long long int z[111111];
int lz;
int bit[111111];
int w[111111];
int lowbit(int x) { return x & -x; }
int query(int x) {
  int res = 0;
  while (x) {
    res = max(res, bit[x]);
    x -= lowbit(x);
  }
  return res;
}
void update(int x, int y) {
  while (x <= lz) {
    bit[x] = max(bit[x], y);
    x += lowbit(x);
  }
}
int main() {
  long long int a, b, c, d;
  int m;
  scanf("%d%I64d%*c%I64d%I64d%*c%I64d", &m, &a, &b, &c, &d);
  n = 0;
  while (m--) {
    int x, y;
    scanf("%d%d", &x, &y);
    p[n] = make_pair(d * y - c * x, -b * y + a * x);
    if (p[n].first > 0 || p[n].second > 0) continue;
    z[lz++] = p[n++].second;
  }
  sort(p, p + n);
  sort(z, z + lz);
  lz = unique(z, z + lz) - z;
  res = 0;
  for (int i = 0, j; i < n; i = j) {
    for (j = i; j < n && p[j].first == p[i].first; j++) {
      int pos = lower_bound(z, z + lz, p[j].second) - z + 1;
      w[j] = query(pos - 1) + 1;
      res = max(res, w[j]);
    }
    for (int k = i; k < j; k++) {
      int pos = lower_bound(z, z + lz, p[k].second) - z + 1;
      update(pos, w[k]);
    }
  }
  printf("%d\n", res);
  return 0;
}
