#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 15;
struct Point {
  int x, y;
  long long key1, key2;
  int pm1, pm2;
} poi[maxn];
int tot;
int tree[maxn];
int f[maxn], ans;
int n;
int a, b, c, d;
bool cm1(Point a, Point b) { return a.key1 < b.key1; }
bool cm2(Point a, Point b) {
  if (a.key2 == b.key2) return a.key1 < b.key1;
  return a.key2 < b.key2;
}
int ins(int x, int z) {
  for (; x <= n; x += x & (-x)) tree[x] = max(tree[x], z);
  return 0;
}
int ask(int x) {
  int ans = 0;
  for (; x; x -= x & (-x)) ans = max(ans, tree[x]);
  return ans;
}
int main() {
  scanf("%d", &n);
  scanf("%d/%d%d/%d", &a, &b, &c, &d);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &poi[i].x, &poi[i].y);
    poi[i].key1 = -1ll * d * poi[i].y + 1ll * c * poi[i].x;
    poi[i].key2 = -1ll * a * poi[i].x + 1ll * b * poi[i].y;
    if (poi[i].key1 <= 0 || poi[i].key2 <= 0) {
      i--;
      n--;
    }
  }
  sort(poi + 1, poi + n + 1, cm1);
  int s1 = 1;
  poi[1].pm1 = 1;
  for (int i = 2; i <= n; i++) {
    if (poi[i].key1 != poi[i - 1].key1) s1++;
    poi[i].pm1 = s1;
  }
  sort(poi + 1, poi + n + 1, cm2);
  int las = 1;
  for (int i = 1; i <= n; i++) {
    if (poi[i].key2 != poi[i - 1].key2)
      for (; las < i; las++) ins(poi[las].pm1, f[las]);
    f[i] = ask(poi[i].pm1 - 1) + 1;
    ans = max(ans, f[i]);
  }
  printf("%d\n", ans);
  return 0;
}
