#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:100000000")
const int T = 1 << 17;
long long x[100500], y[100500];
int ind[100500];
int dmax[2 * T];
vector<long long> v;
map<long long, int> M;
bool cmp(int i, int j) {
  if (x[i] != x[j]) return x[i] > x[j];
  return y[i] < y[j];
}
void update(int i, int x) {
  i += T;
  dmax[i] = max(dmax[i], x);
  while (i > 1) {
    i /= 2;
    dmax[i] = max(dmax[2 * i], dmax[2 * i + 1]);
  }
}
int getmax(int l, int r) {
  l += T;
  r += T;
  int res = 0;
  while (l <= r) {
    res = max(res, dmax[l]);
    res = max(res, dmax[r]);
    l = (l + 1) / 2;
    r = (r - 1) / 2;
  }
  return res;
}
int main() {
  int n;
  int a, b, c, d;
  int i, j;
  scanf("%d", &n);
  scanf("%d/%d %d/%d", &a, &b, &c, &d);
  for (i = 0; i < n; ++i) {
    int xx, yy;
    scanf("%d%d", &xx, &yy);
    x[i] = -(long long)d * yy + (long long)c * xx;
    y[i] = (long long)b * yy - (long long)a * xx;
    ind[i] = i;
  }
  sort(ind, ind + n, cmp);
  for (i = 0; i < n; ++i)
    if (y[i] > 0) v.push_back(y[i]);
  sort(v.begin(), v.end());
  v.resize(unique(v.begin(), v.end()) - v.begin());
  for (i = 0; i < v.size(); ++i) {
    M[v[i]] = i;
  }
  for (i = 0; i < n; ++i)
    if (y[i] > 0)
      y[i] = M[y[i]];
    else
      y[i] = -1;
  int mxY = v.size();
  int ans = 0;
  for (i = 0; i < n; ++i) {
    if (x[ind[i]] <= 0 || y[ind[i]] < 0) continue;
    int mx = getmax(y[ind[i]] + 1, mxY) + 1;
    ans = max(ans, mx);
    update(y[ind[i]], mx);
  }
  printf("%d\n", ans);
  return 0;
}
