#include <bits/stdc++.h>
using namespace std;
struct note {
  long long x, y;
} p[100005];
int n;
int a, b, c, d;
int tot;
int ans;
long long q[100005];
bool cmp(note i, note j) { return i.x < j.x || i.x == j.x && i.y > j.y; }
int main() {
  scanf("%d", &n);
  scanf("%d/%d%d/%d", &a, &b, &c, &d);
  for (int i = 1; i <= n; i++) {
    long long x, y;
    scanf("%I64d%I64d", &x, &y);
    long long px = b * y - a * x, py = c * x - d * y;
    if (px <= 0 || py <= 0) continue;
    p[++tot].x = px;
    p[tot].y = py;
  }
  sort(p + 1, p + tot + 1, cmp);
  for (int i = 1; i <= tot; i++) {
    if (p[i].y > q[ans]) {
      ++ans;
      q[ans] = p[i].y;
      continue;
    }
    int wz = 0, l = 1, r = ans;
    while (l <= r) {
      int mid = (l + r) >> 1;
      if (p[i].y > q[mid]) {
        wz = mid;
        l = mid + 1;
      } else
        r = mid - 1;
    }
    q[wz + 1] = p[i].y;
  }
  printf("%d", ans);
  return 0;
}
