#include <bits/stdc++.h>
using namespace std;
const int MAX_SIZE = 100000;
inline void readInt(int& a) {
  a = 0;
  int c;
  do c = getchar();
  while (c < '0' || c > '9');
  do {
    a = a * 10 - '0' + c;
    c = getchar();
  } while (c >= '0' && c <= '9');
}
struct Point {
  long long x, y;
};
inline bool operator<(const Point& a, const Point& b) {
  if (a.x == b.x) return a.y < b.y;
  return a.x < b.x;
}
Point data[MAX_SIZE + 10];
int n, f[MAX_SIZE + 10];
int u1, d1, u2, d2, tn;
int arr[MAX_SIZE + 10];
long long val[MAX_SIZE + 10];
int vn;
void change(int p, int v) {
  for (++p; p; p -= ((p) & -(p)))
    if (v > arr[p]) arr[p] = v;
}
int query(int p) {
  int ans = 0;
  for (++p; p <= vn; p += ((p) & -(p)))
    if (arr[p] > ans) ans = arr[p];
  return ans;
}
int main() {
  readInt(n);
  readInt(u1);
  readInt(d1);
  readInt(u2);
  readInt(d2);
  for (int i = 1; i <= n; i++) {
    int x, y;
    readInt(x);
    readInt(y);
    data[i].x = (long long)u1 * x - (long long)d1 * y;
    data[i].y = (long long)u2 * x - (long long)d2 * y;
    val[vn++] = data[i].y;
  }
  ++n;
  data[n].x = data[n].y = 0;
  val[vn++] = 0;
  sort(val, val + vn);
  vn = unique(val, val + vn) - val;
  sort(data + 1, data + n + 1);
  for (int i = 1; i <= n; i++) {
    int p = lower_bound(val, val + vn, data[i].y) - val;
    int v = query(p + 1) + 1;
    f[i] = v;
    change(p, v);
  }
  int i;
  for (i = n; i >= 1; i--)
    if (data[i].x == 0 && data[i].y == 0) break;
  printf("%d\n", f[i] - 1);
  return 0;
}
