#include <bits/stdc++.h>
using namespace std;
bool debug = false;
int n, m, k;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
long long ln, lk, lm;
struct Point {
  long long x, y;
  Point() {}
  Point(long long x, long long y) : x(x), y(y) {}
  bool operator<(const Point& o) const {
    return x < o.x || (x == o.x && y > o.y);
  }
};
vector<Point> vp;
long long d[100005];
void cal() {
  d[1] = vp[1].y;
  if (vp.size() == 1) {
    puts("0");
    return;
  }
  int len = 1;
  for (int i = 2; i < vp.size(); i++) {
    if (vp[i].y > d[len])
      d[++len] = vp[i].y;
    else {
      int j = lower_bound(d + 1, d + len + 1, vp[i].y) - d;
      d[j] = vp[i].y;
    }
  }
  printf("%d\n", len);
}
int main() {
  scanf("%d", &n);
  int a, b, c, d;
  scanf(" %d/%d %d/%d", &a, &b, &c, &d);
  long long x, y;
  vp.push_back(Point(-1, -1));
  for (int(i) = 0; (i) < (int)(n); (i)++) {
    scanf("%lld%lld", &x, &y);
    long long xx = y * b - x * a;
    long long yy = x * c - y * d;
    if (xx <= 0 || yy <= 0) continue;
    vp.push_back(Point(xx, yy));
  }
  sort(vp.begin(), vp.end());
  cal();
  return 0;
}
