#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
const double EPS = 1e-12;
struct frac {
  long long up;
  long long down;
};
struct ord {
  frac x;
  frac y;
} p[N];
frac mink, maxk;
long long x, y;
frac dp[N];
int main() {
  int n, cnt;
  scanf("%d", &n);
  scanf("%lld/%lld", &mink.up, &mink.down);
  scanf("%lld/%lld", &maxk.up, &maxk.down);
  cnt = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%lld %lld", &x, &y);
    cnt++;
    p[cnt].x.up = maxk.up * x - maxk.down * y;
    p[cnt].x.down = maxk.up * mink.down - maxk.down * mink.up;
    p[cnt].y.up = mink.down * y - mink.up * x;
    p[cnt].y.down = maxk.up * mink.down - maxk.down * mink.up;
    if (p[cnt].x.up <= 0 || p[cnt].y.up <= 0) {
      cnt--;
    }
  }
  sort(p + 1, p + cnt + 1, [&](ord xx, ord yy) {
    if (fabs(1.0 * xx.x.up / xx.x.down - 1.0 * yy.x.up / yy.x.down) < EPS) {
      return 1.0 * xx.y.up / xx.y.down > 1.0 * yy.y.up / yy.y.down;
    } else {
      return 1.0 * xx.x.up / xx.x.down < 1.0 * yy.x.up / yy.x.down;
    }
  });
  dp[0].up = 0;
  dp[0].down = 1;
  for (int i = 1; i <= cnt; i++) {
    dp[i].up = 1;
    dp[i].down = 0;
  }
  for (int i = 1; i <= cnt; i++) {
    int k = lower_bound(dp, dp + cnt + 1, p[i].y,
                        [&](frac xx, frac yy) {
                          return 1.0 * xx.up / xx.down < 1.0 * yy.up / yy.down;
                        }) -
            dp;
    dp[k] = p[i].y;
  }
  for (int i = cnt; i >= 0; i--) {
    if (dp[i].down > 0) {
      printf("%d\n", i);
      break;
    }
  }
  return 0;
}
