#include <bits/stdc++.h>
using namespace std;
struct Point {
  long long x, y;
} p[100005];
bool cmp(const Point &x, const Point &y) {
  return x.x == y.x ? x.y > y.y : x.x < y.x;
}
long long r[100005];
int main() {
  int n, a, b, c, d, top = 0;
  scanf("%d", &n);
  scanf("%d/%d%d/%d", &a, &b, &c, &d);
  for (int i = 1, x, y; i <= n; i++) {
    scanf("%d%d", &x, &y);
    p[i].y = (long long)b * y - (long long)a * x;
    p[i].x = (long long)x * c - (long long)y * d;
    if (p[i].y <= 0 || p[i].x <= 0) i--, n--;
  }
  sort(p + 1, p + 1 + n, cmp);
  for (int i = 1; i <= n; i++)
    if (p[i].y > r[top])
      r[++top] = p[i].y;
    else
      r[lower_bound(r + 1, r + 1 + top, p[i].y) - r] = p[i].y;
  printf("%d\n", top);
}
