#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int A, B, C, D;
struct Point {
  long long x, y;
  Point(long long x, long long y) : x(x), y(y) {}
};
bool operator<(const Point& a, const Point& b) {
  return a.x < b.x || (a.x == b.x && a.y > b.y);
}
int main() {
  int n;
  scanf("%d", &n);
  scanf("%d/%d %d/%d", &A, &B, &C, &D);
  vector<Point> P;
  for (int i = 0; i < n; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    long long x = (long long)B * v - (long long)A * u;
    long long y = (long long)C * u - (long long)D * v;
    if (x > 0 && y > 0) {
      P.emplace_back(Point(x, y));
    }
  }
  sort(P.begin(), P.end());
  vector<long long> len;
  for (auto& it : P) {
    int idx = lower_bound(len.begin(), len.end(), it.y) - len.begin();
    if (idx == len.size()) {
      len.emplace_back(it.y);
    } else {
      len[idx] = it.y;
    }
  }
  printf("%d\n", len.size());
  return 0;
}
