#include <bits/stdc++.h>
using namespace std;
pair<int, int> p[110000];
int Ix[110000], Iy[110000], x[110000], y[110000], val[110000];
int a, b, c, d, N;
long long multi(int x0, int y0, int x1, int y1, int x2, int y2) {
  return (long long)(x1 - x0) * (y2 - y0) - (long long)(y1 - y0) * (x2 - x0);
}
long long Calcx(int u, int v) {
  int xx, yy;
  xx = x[u] + d;
  yy = y[u] + c;
  return multi(x[u], y[u], xx, yy, x[v], y[v]);
}
bool cmpx(int u, int v) { return Calcx(u, v) < 0; }
long long Calcy(int u, int v) {
  int xx, yy;
  xx = x[u] + b;
  yy = y[u] + a;
  return multi(x[u], y[u], xx, yy, x[v], y[v]);
}
bool cmpy(int u, int v) { return Calcy(u, v) > 0; }
bool cmp(pair<int, int> u, pair<int, int> v) {
  if (u.first != v.first) return u.first < v.first;
  return u.second > v.second;
}
void Update(int u, int v) {
  while (u < 110000) {
    val[u] = max(val[u], v);
    u += u & -u;
  }
}
int Calc(int u) {
  int r = -110000 - 110000;
  while (u) {
    r = max(r, val[u]);
    u -= u & -u;
  }
  return r;
}
int main() {
  int xx, yy, k, i, j, u;
  long long xxx;
  scanf("%d", &N);
  scanf("%d/%d %d/%d", &a, &b, &c, &d);
  for (i = 0; i <= N; i++) {
    scanf("%d%d", &x[i], &y[i]);
    Ix[i] = Iy[i] = i;
  }
  x[N] = y[N] = 0;
  sort(Ix, Ix + N + 1, cmpx);
  sort(Iy, Iy + N + 1, cmpy);
  for (j = i = 0; i <= N; i++) {
    u = Ix[i];
    if (i == 0 || (i > 0 && Calcx(Ix[i - 1], Ix[i]))) {
      j++;
    }
    p[u].first = j;
  }
  for (j = i = 0; i <= N; i++) {
    u = Iy[i];
    if (i == 0 || (i > 0 && Calcy(Iy[i - 1], Iy[i]))) {
      j++;
    }
    p[u].second = j;
  }
  for (i = 0; i < 110000; i++) val[i] = -110000 - 110000;
  xx = p[N].first;
  yy = p[N].second;
  Update(yy, 0);
  sort(p, p + N + 1, cmp);
  for (i = 0; i <= N; i++) {
    if (p[i].first <= xx) continue;
    k = Calc(p[i].second - 1);
    Update(p[i].second, k + 1);
  }
  printf("%d\n", Calc(110000 - 1));
  return 0;
}
