#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.141592653589793238462643l;
void solve();
int main() {
  solve();
  return 0;
}
inline long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
vector<pair<long long, long long> > v;
vector<pair<long long, long long> > a, b;
long long n, aa, bb, cc, dd;
set<pair<pair<long long, long long>, long long> > s;
bool fa(pair<long long, long long> q, pair<long long, long long> w) {
  long long xx = q.first - w.first, yy = q.second - w.second;
  if (bb * yy - aa * xx < 0) return 1;
  if (bb * yy - aa * xx == 0 && q > w) return 1;
  return 0;
}
bool fb(pair<long long, long long> q, pair<long long, long long> w) {
  long long xx = q.first - w.first, yy = q.second - w.second;
  if (dd * yy - cc * xx < 0) return 1;
  if (dd * yy - cc * xx == 0 && q < w) return 1;
  return 0;
}
char tyu;
long long kol[100500];
long long tree[400500];
void change(long long k) {
  if (k) {
    if (tree[k / 2] < tree[k]) tree[k / 2] = tree[k];
    change(k / 2);
  }
}
long long maxx(long long l, long long r) {
  long long ans = max(tree[l], tree[r]);
  if (l % 2) l++;
  if (r % 2 == 0) r--;
  if (r >= l) ans = max(ans, maxx(l / 2, r / 2));
  return ans;
}
void solve() {
  cin >> n >> aa >> tyu >> bb >> cc >> tyu >> dd;
  for (long long i = 0; i < n; i++) {
    long long q, w;
    cin >> q >> w;
    if (w * bb > aa * q && w * dd < cc * q) {
      v.push_back(make_pair(q, w));
      a.push_back(make_pair(q, w));
      b.push_back(make_pair(q, w));
    }
  }
  n = v.size();
  sort(a.begin(), a.end(), fa);
  sort(b.begin(), b.end(), fb);
  for (long long i = 0; i < n; i++) kol[i] = 1;
  long long br = 0;
  long long ans = 0;
  long long st = 1;
  while (st < n) st *= 2;
  for (long long i = 0; i < st * 2 + 5; i++) tree[i] = 0;
  for (long long i = 0; i < n; i++) {
    s.insert(make_pair(a[i], i));
    while (br < n && s.lower_bound(make_pair(b[br], 0)) != s.end()) {
      pair<pair<long long, long long>, long long> io =
          *s.lower_bound(make_pair(b[br], 0));
      if (io.first == b[br]) {
        br++;
        kol[io.second] = maxx(st + io.second, st + n - 1) + 1;
        tree[io.second + st] = kol[io.second];
        change(st + io.second);
      } else
        break;
    }
  }
  for (long long i = 0; i < n; i++)
    if (ans < kol[i]) ans = kol[i];
  cout << ans;
}
