#include <bits/stdc++.h>
using namespace std;
const int N = 100000 + 5;
const int INF = 1000000000;
pair<long long, long long> p[N];
int f[N], ans[N], n, cntr, cntc, x, y;
long long R[N], C[N], a, b, c, d;
inline void cmax(int& x, int y) {
  if (y > x) x = y;
}
inline int getans(int now) {
  int rt = -INF;
  for (++now; now; now -= ((now) & (-(now)))) cmax(rt, f[now]);
  return rt;
}
inline void update(int now, int delta) {
  for (++now; now <= cntc + 1; now += ((now) & (-(now)))) cmax(f[now], delta);
}
int main(int argc, char** argv) {
  scanf("%d%I64d/%I64d%I64d/%I64d", &n, &a, &b, &c, &d);
  for (int i = 1; i <= n; ++i) {
    scanf("%d%d", &x, &y);
    R[i] = p[i].first = b * y - a * x;
    C[i] = p[i].second = c * x - d * y;
  }
  sort(R + 1, R + n + 1);
  sort(C + 1, C + n + 1);
  cntr = unique(R + 1, R + n + 1) - R - 1;
  cntc = unique(C + 1, C + n + 1) - C - 1;
  for (int i = 1; i <= n; ++i) {
    p[i].first = lower_bound(R + 1, R + cntr + 1, p[i].first) - R;
    p[i].second = lower_bound(C + 1, C + cntc + 1, p[i].second) - C;
  }
  sort(p + 1, p + n + 1);
  for (int i = 1; i <= n + 1; ++i) f[i] = -INF;
  update(0, 0);
  for (int i = 1, j = 1, k; i <= cntr; ++i, j = k) {
    for (k = j; p[k].first == i; ++k)
      ;
    for (int l = j; l < k; ++l)
      if (R[p[l].first] >= 0 && C[p[l].second] >= 0)
        ans[l] = getans(p[l].second - 1) + 1;
    for (int l = j; l < k; ++l)
      if (R[p[l].first] >= 0 && C[p[l].second] >= 0)
        update(p[l].second, ans[l]);
  }
  printf("%d\n", getans(cntc));
  return 0;
}
