#include <bits/stdc++.h>
using namespace std;
long long cross(complex<long long> a, complex<long long> b) {
  return a.real() * b.imag() - a.imag() * b.real();
}
int n;
complex<long long> alpha, beta;
vector<complex<long long>> pts;
vector<pair<long long, long long>> lr;
map<long long, int> dp;
int main() {
  cin >> n;
  {
    int a, b, c, d;
    cin >> a;
    cin.ignore();
    cin >> b >> c;
    cin.ignore();
    cin >> d;
    alpha = complex<long long>(b, a);
    beta = complex<long long>(d, c);
  }
  for (int i = 0, x, y; i < n; ++i) {
    cin >> x >> y;
    pts.push_back(complex<long long>(x, y));
  }
  for (complex<long long> p : pts) {
    long long l = cross(alpha, p), r = cross(beta, p);
    if (l <= 0 || r >= 0) continue;
    lr.push_back(make_pair(l, r));
  }
  sort(lr.begin(), lr.end());
  int ans = 0;
  for (auto i : lr) {
    map<long long, int>::iterator it = dp.upper_bound(i.second);
    int len = (it == dp.end() ? 0 : it->second) + 1;
    ans = max(ans, len);
    dp[i.second] = len;
    it = dp.find(i.second);
    if (it == dp.begin()) continue;
    --it;
    while (it != dp.begin() && len >= it->second) dp.erase(it--);
    if (len >= it->second) dp.erase(it);
  }
  cout << ans << "\n";
  return 0;
}
