#include <bits/stdc++.h>
using namespace std;
const int N = int(1e5 + 5);
const double eps = 1e-9;
int a, b, c, d;
int x[N], y[N], n;
int ox[N], oy[N], od[N];
int f[N], T[N];
double p[N], K1, K2;
double fabs(double x) { return x >= 0 ? x : -x; }
bool cmp(int x, int y) { return p[x] > p[y]; }
bool cmx(int x, int y) { return p[x] < p[y]; }
bool cm2(int x, int y) {
  return ox[x] == ox[y] ? oy[x] < oy[y] : ox[x] < ox[y];
}
int Q(int x) {
  int r(0);
  for (; x <= n; x += x & (-x)) r = max(r, T[x]);
  return r;
}
void U(int x, int y) {
  for (; x; x -= x & (-x)) T[x] = max(T[x], y);
}
int main() {
  scanf("%d", &n);
  scanf("%d/%d%d/%d", &a, &b, &c, &d), K1 = double(b) / double(a),
                                       K2 = double(c) / double(d);
  for (int i = 1; i <= n; i++) scanf("%d%d", &x[i], &y[i]);
  ++n;
  for (int i = 1; i <= n; i++) p[i] = a ? (x[i] - K1 * y[i]) : -y[i], od[i] = i;
  sort(od + 1, od + n + 1, cmx), ox[od[1]] = 1;
  for (int i = 2; i <= n; i++)
    ox[od[i]] = ox[od[i - 1]] + (fabs(p[od[i]] - p[od[i - 1]]) > eps);
  for (int i = 1; i <= n; i++) p[i] = d ? (y[i] - K2 * x[i]) : -x[i], od[i] = i;
  sort(od + 1, od + n + 1, cmp), oy[od[1]] = 1;
  for (int i = 2; i <= n; i++)
    oy[od[i]] = oy[od[i - 1]] + (fabs(p[od[i]] - p[od[i - 1]]) > eps);
  for (int i = 1; i <= n; i++) od[i] = i;
  sort(od + 1, od + n + 1, cm2);
  for (int ip = 1, i; ip <= n; ip++)
    i = od[ip], f[i] = Q(oy[i] + 1) + 1, U(oy[i], f[i]);
  printf("%d\n", f[n] - 1);
  return 0;
}
