#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const int N = 121000;
int n, a, b, c, d, f[N];
double len[N];
struct node {
  double l, r;
} stars[N];
inline int cmp(const void* a, const void* b) {
  node *A = (node*)a, *B = (node*)b;
  if (fabs(A->l - B->l) < eps) {
    return A->r < B->r ? -1 : 1;
  }
  return A->l < B->l ? -1 : 1;
}
double geti(int x, int y, int a, int b) {
  if (a == 0) return y;
  if (b == 0) return x;
  double K = (double)a / b, B = y - K * x, A = -B / K;
  if (A < 0) return A;
  return B;
}
int main() {
  scanf("%d %d/%d %d/%d", &n, &a, &b, &c, &d);
  for (int i = 1; i <= n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    stars[i].l = geti(-x, y, a, -b);
    stars[i].r = -geti(-x, y, c, -d);
  }
  qsort(stars + 1, n, sizeof stars[0], cmp);
  for (int i = 1; i <= n; i++) len[i] = 1e90;
  stars[n + 1].l = stars[n].l + 1;
  len[0] = 0;
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    if (stars[i].l <= eps || stars[i].r <= eps) continue;
    int left = 0, right = n;
    while (right - left > 1) {
      int mid = (left + right) >> 1;
      if (len[mid] < stars[i].r)
        left = mid;
      else
        right = mid - 1;
    }
    if (len[right] < stars[i].r) left = right;
    f[i] = left + 1;
    if (fabs(stars[i].l - stars[i + 1].l) > eps) {
      int j = i;
      while (j > 0 && (fabs(stars[j].l - stars[i].l) < eps)) {
        if (len[f[j]] > stars[j].r) len[f[j]] = stars[j].r;
        j--;
      }
    }
    if (f[i] > ans) ans = f[i];
  }
  printf("%d\n", ans);
}
