#include <bits/stdc++.h>
using namespace std;
template <class T>
void PV(T x) {
  for (__typeof__((x).begin()) i = (x).begin(); i != (x).end(); i++)
    cout << *i << " ";
  cout << endl;
}
template <class T>
inline void gmax(T &a, T b) {
  if (a < b) a = b;
}
vector<long long> x, y;
long long n, a, b, c, d, cn;
vector<long long> id;
vector<long long> dsc;
long long segNum(long long a, long long b, long long x, long long y) {
  return b * y - a * x;
}
long long abNum(long long id) { return segNum(a, b, x[id], y[id]); }
long long cdNum(long long id) { return segNum(c, d, x[id], y[id]); }
bool idCmp(long long l, long long r) {
  if (abNum(l) != abNum(r)) return abNum(l) > abNum(r);
  return cdNum(l) > cdNum(r);
}
struct Seg {
  long long l, r, lc, rc, maxi;
};
vector<Seg> seg;
long long seg_init(long long l, long long r) {
  static long long segn = 0;
  long long mid = (l + r) / 2;
  long long p = segn++;
  Seg &ns = seg[p];
  if (l == r) {
    ns.l = l;
    ns.r = r;
    ns.maxi = 0;
  } else {
    ns.l = l;
    ns.r = r;
    ns.maxi = 0;
    ns.lc = seg_init(l, mid);
    ns.rc = seg_init(mid + 1, r);
  }
  return p;
}
long long seg_find(long long p, long long l, long long r) {
  Seg &ns = seg[p];
  long long mid = (ns.l + ns.r) / 2;
  if (l <= ns.l && ns.r <= r) return ns.maxi;
  long long ret = 0;
  if (l <= mid) gmax(ret, seg_find(ns.lc, l, r));
  if (r > mid) gmax(ret, seg_find(ns.rc, l, r));
  return ret;
}
void seg_ins(long long p, long long loc, long long v) {
  Seg &ns = seg[p];
  long long mid = (ns.l + ns.r) / 2;
  if (ns.l == ns.r) {
    gmax(ns.maxi, v);
    return;
  }
  if (loc <= mid)
    seg_ins(ns.lc, loc, v);
  else
    seg_ins(ns.rc, loc, v);
  ns.maxi = max(seg[ns.lc].maxi, seg[ns.rc].maxi);
}
int main(int argc, char *argv[]) {
  {
    char tc;
    cin >> n >> a >> tc >> b >> c >> tc >> d;
  }
  x.resize(n), y.resize(n);
  for (int n_ = (n), i = 0; i < n_; ++i) cin >> x[i] >> y[i];
  for (int n_ = (n), i = 0; i < n_; ++i) dsc.push_back(cdNum(i));
  sort((dsc).begin(), (dsc).end());
  dsc.resize(cn = unique((dsc).begin(), (dsc).end()) - dsc.begin());
  for (int n_ = (n), i = 0; i < n_; ++i) id.push_back(i);
  sort((id).begin(), (id).end(), idCmp);
  seg.resize(cn * 2 - 1);
  seg_init(0, cn - 1);
  long long ret = 0;
  for (long long i = 0, j = 0; i < id.size(); i++) {
    long long nAbNum = abNum(id[i]);
    long long nCdNum = cdNum(id[i]);
    long long nc =
        lower_bound((dsc).begin(), (dsc).end(), nCdNum) - dsc.begin();
    long long pv;
    if (!nc)
      pv = 0;
    else
      pv = seg_find(0, 0, nc - 1);
    long long v = pv + 1;
    seg_ins(0, nc, v);
    if (nAbNum > 0 && nCdNum < 0) {
      gmax(ret, v);
    }
  }
  cout << ret << endl;
  return 0;
}
