#include <bits/stdc++.h>
using namespace std;
inline int Get_Int() {
  int Num = 0, Flag = 1;
  char ch;
  do {
    ch = getchar();
    if (ch == '-') Flag = -Flag;
  } while (ch < '0' || ch > '9');
  do {
    Num = Num * 10 + ch - '0';
    ch = getchar();
  } while (ch >= '0' && ch <= '9');
  return Num * Flag;
}
class Point {
 public:
  long long X, Y;
  inline bool operator<(Point const &a) const {
    if (X != a.X) return X < a.X;
    return Y > a.Y;
  }
} Points[100005];
long long N, Total, A, B, C, D, Ans;
long long F[100005];
int main() {
  cin >> N;
  A = Get_Int();
  B = Get_Int();
  C = Get_Int();
  D = Get_Int();
  for (int i = 1; i <= N; ++i) {
    long long X = Get_Int(), Y = Get_Int();
    Points[++Total].X = Y * B - X * A;
    Points[Total].Y = X * C - Y * D;
    if (Points[Total].X <= 0 || Points[Total].Y <= 0) --Total;
  }
  sort(Points + 1, Points + Total + 1);
  F[++Ans] = 0;
  for (int i = 1; i <= Total; ++i) {
    *lower_bound(F + 1, F + Ans + 1, Points[i].Y) = Points[i].Y;
    Ans += (Points[i].Y > F[Ans]);
  }
  cout << Ans - 1 << endl;
  return 0;
}
