#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 7;
const long double EPS = 1e-8;
long long dp[N];
bool comp(pair<long long, long long> a, pair<long long, long long> b) {
  return a.first < b.first || (a.first == b.first && a.second > b.second);
}
void nvp(vector<pair<long long, long long> > a) {
  for (long long i = 1; i < N; ++i) dp[i] = N;
  sort(a.begin(), a.end(), comp);
  for (auto p : a) dp[lower_bound(dp, dp + N, p.second) - dp] = p.second;
  for (long long i = N - 1;; --i)
    if (dp[i] != N) {
      cout << i << '\n';
      exit(0);
    }
}
pair<long double, long double> a[N];
long double gett(long double a, long double b) { return (a - b) / (1 + a * b); }
bool eq(long double a, long double b) { return abs(a - b) < EPS; }
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  long double A, B, C, D;
  char t;
  cin >> n >> A >> t >> B >> C >> t >> D;
  long double ang = -atan2(A, B);
  for (long long i = 0; i < n; ++i) {
    cin >> a[i].first >> a[i].second;
    a[i] = make_pair(a[i].first * cos(ang) - a[i].second * sin(ang),
                     a[i].first * sin(ang) + a[i].second * cos(ang));
  }
  long double tg = tan(atan2(C, D) - atan2(A, B));
  vector<long double> c;
  for (long long i = 0; i < n; ++i) {
    a[i].first -= a[i].second / tg;
    c.push_back(a[i].first);
    c.push_back(a[i].second);
  }
  sort(c.begin(), c.end());
  c.resize(unique(c.begin(), c.end(), eq) - c.begin());
  vector<pair<long long, long long> > q;
  for (long long i = 0; i < n; ++i)
    if (a[i].first > 0 && a[i].second > 0) {
      long long l = -1, r = c.size();
      while (l < r - 1) {
        long long m = (l + r) >> 1;
        if (c[m] + EPS < a[i].first)
          l = m;
        else
          r = m;
      }
      long long x = r + 1;
      l = -1;
      r = c.size();
      while (l < r - 1) {
        long long m = (l + r) >> 1;
        if (c[m] + EPS < a[i].second)
          l = m;
        else
          r = m;
      }
      long long y = r + 1;
      q.push_back(make_pair(x, y));
    }
  nvp(q);
}
