#include <bits/stdc++.h>
using namespace std;
struct point {
  long long x, y;
  bool operator<(point const& a) const {
    return (x != a.x ? x < a.x : y > a.y);
  }
};
int main() {
  int n, a, b, c, d;
  char dummy;
  cin >> n >> a >> dummy >> b >> c >> dummy >> d;
  point temp;
  vector<point> P;
  long long x, y;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    temp.x = c * x - d * y;
    temp.y = -a * x + b * y;
    if (temp.x >= 0 && temp.y >= 0) P.push_back(temp);
  }
  sort(P.begin(), P.end());
  vector<point>::iterator pit;
  vector<long long> min;
  vector<long long>::iterator lit;
  for (pit = P.begin(); pit != P.end(); pit++) {
    lit = lower_bound(min.begin(), min.end(), pit->y);
    if (lit != min.end())
      *lit = pit->y;
    else
      min.push_back(pit->y);
  }
  cout << min.size();
  return 0;
}
