#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-7;
int Sgn(double x) {
  if (fabs(x) <= EPS) return 0;
  return x < 0 ? -1 : +1;
}
int main() {
  int n;
  scanf("%d", &n);
  int a, b;
  scanf("%d/%d", &a, &b);
  int c, d;
  scanf("%d/%d", &c, &d);
  vector<pair<long long, long long>> pts;
  for (int i = 0; i < n; ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    if (1LL * y * b < 1LL * a * x || 1LL * y * d > 1LL * c * x) continue;
    long long nx = 1LL * x * b + 1LL * y * a;
    long long ny = -1LL * x * a + 1LL * y * b;
    pts.emplace_back(nx, ny);
  }
  n = pts.size();
  double ang = atan2(c, d) - atan2(a, b), tan_ang = tan(-ang);
  sort(pts.begin(), pts.end(),
       [&](pair<long long, long long> &a, pair<long long, long long> &b) {
         double lhs = a.first + a.second / tan_ang;
         double rhs = b.first + b.second / tan_ang;
         if (Sgn(lhs - rhs) == 0) return a.second < b.second;
         return lhs > rhs;
       });
  vector<long long> ends;
  for (int i = 0; i < n; ++i) {
    auto it = upper_bound(ends.rbegin(), ends.rend(), pts[i].second);
    if (it == ends.rbegin()) {
      ends.emplace_back(pts[i].second);
    } else {
      --it;
      (*it) = max(*it, pts[i].second);
    }
  }
  cout << ends.size() << endl;
}
