In the evenings Donkey would join Shrek to look at the stars. They would sit on a log, sipping tea and they would watch the starry sky. The sky hung above the roof, right behind the chimney. Shrek's stars were to the right of the chimney and the Donkey's stars were to the left. Most days the Donkey would just count the stars, so he knew that they are exactly n. This time he wanted a challenge. He imagined a coordinate system: he put the origin of the coordinates at the intersection of the roof and the chimney, directed the OX axis to the left along the roof and the OY axis — up along the chimney (see figure). The Donkey imagined two rays emanating from he origin of axes at angles α1 and α2 to the OX axis.

<image>

Now he chooses any star that lies strictly between these rays. After that he imagines more rays that emanate from this star at the same angles α1 and α2 to the OX axis and chooses another star that lies strictly between the new rays. He repeats the operation as long as there still are stars he can choose between the rays that emanate from a star. 

<image>

As a result, the Donkey gets a chain of stars. He can consecutively get to each star if he acts by the given rules.

Your task is to find the maximum number of stars m that the Donkey's chain can contain.

Note that the chain must necessarily start in the point of the origin of the axes, that isn't taken into consideration while counting the number m of stars in the chain.

Input

The first line contains an integer n (1 ≤ n ≤ 105) — the number of stars. The second line contains simple fractions representing relationships "a/b c/d", such that <image> and <image> (0 ≤ a, b, c, d ≤ 105; <image>; <image>; <image>). The given numbers a, b, c, d are integers.

Next n lines contain pairs of integers xi, yi (1 ≤ xi, yi ≤ 105)— the stars' coordinates.

It is guaranteed that all stars have distinct coordinates.

Output

In a single line print number m — the answer to the problem.

Examples

Input

15
1/3 2/1
3 1
6 2
4 2
2 5
4 5
6 6
3 4
1 6
2 1
7 4
9 3
5 3
1 3
15 5
12 4


Output

4

Note

In the sample the longest chain the Donkey can build consists of four stars. Note that the Donkey can't choose the stars that lie on the rays he imagines.

<image>
#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
inline void smin(T &a, const U &b) {
  if (a > b) a = b;
}
template <typename T, typename U>
inline void smax(T &a, const U &b) {
  if (a < b) a = b;
}
template <class T>
inline void gn(T &first) {
  char c, sg = 0;
  while (c = getchar(), (c > '9' || c < '0') && c != '-')
    ;
  for ((c == '-' ? sg = 1, c = getchar() : 0), first = 0; c >= '0' && c <= '9';
       c = getchar())
    first = (first << 1) + (first << 3) + c - '0';
  if (sg) first = -first;
}
template <class T1, class T2>
inline void gn(T1 &x1, T2 &x2) {
  gn(x1), gn(x2);
}
template <class T1, class T2, class T3>
inline void gn(T1 &x1, T2 &x2, T3 &x3) {
  gn(x1, x2), gn(x3);
}
template <class T>
inline void print(T first) {
  if (first < 0) {
    putchar('-');
    return print(-first);
  }
  if (first < 10) {
    putchar('0' + first);
    return;
  }
  print(first / 10);
  putchar(first % 10 + '0');
}
template <class T>
inline void println(T first) {
  print(first);
  putchar('\n');
}
template <class T>
inline void printsp(T first) {
  print(first);
  putchar(' ');
}
template <class T1, class T2>
inline void print(T1 x1, T2 x2) {
  printsp(x1), println(x2);
}
template <class T1, class T2, class T3>
inline void print(T1 x1, T2 x2, T3 x3) {
  printsp(x1), printsp(x2), println(x3);
}
int power(int a, int b, int m, int ans = 1) {
  for (; b; b >>= 1, a = (long long)a * a % m)
    if (b & 1) ans = (long long)ans * a % m;
  return ans;
}
long long a, b, c, d;
long long arr[100010];
int n, nn, B[100010];
struct point {
  long long first, second, mn, mx;
  int flag;
  point(long long first = 0, long long second = 0, long long mn = 0,
        long long mx = 0, int flag = 0)
      : first(first), second(second), mn(mn), mx(mx), flag(flag) {}
  point operator-(point a) { return point(first - a.first, second - a.second); }
  point operator+(point a) { return point(first + a.first, second + a.second); }
  point operator*(int a) { return point(first * a, second * a); }
  point operator/(int a) { return point(first / a, second / a); }
  point operator&(point a) {
    return point(first * a.first - second * a.second,
                 first * a.second + second * a.first);
  }
  point rotate(double al) { return *this & point(cos(al), sin(al)); }
  long long operator^(point a) {
    return 1LL * first * a.second - 1LL * second * a.first;
  }
  long long operator*(point a) {
    return 1LL * first * a.first + 1LL * second * a.second;
  }
  point conj() { return point(-second, first); }
  double nor() { return sqrt(*this * *this); }
  long long nor2() { return *this * *this; }
  double al() { return atan2(second, first); }
  bool operator<(const point &a) const {
    if (first != a.first) return first < a.first;
    return second < a.second;
  }
  bool operator>(const point &a) const {
    if (first != a.first) return first > a.first;
    return second > a.second;
  }
  bool operator==(const point &a) const {
    return (first == a.first && second == a.second);
  }
  bool operator!=(const point &a) const {
    return (first != a.first || second != a.second);
  }
  void input() {
    gn(first, second);
    mn = a * first - b * second;
    mx = c * first - d * second;
    if (mn < 0 && mx > 0) flag = 1;
    arr[nn++] = mx;
  }
  void print() { printf("%I64d %I64d\n", first, second); }
} p[100010];
bool cmp(point A, point B) {
  if (A.mn == B.mn) return A.mx < B.mx;
  return A.mn < B.mn;
}
void update(int u, int first) {
  for (; u; u -= u & -u) smax(B[u], first);
}
int calc(int u, int ans = 0) {
  for (; u < n + 3; u += u & -u) smax(ans, B[u]);
  return ans;
}
int main() {
  scanf("%d %I64d/%I64d %I64d/%I64d", &n, &a, &b, &c, &d);
  for (int i = 0; i < n; i++) p[i].input();
  sort(p, p + n, cmp);
  arr[nn++] = 0x3f3f3f3f;
  sort(arr, arr + nn);
  nn = unique(arr, arr + nn) - arr;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    int id = lower_bound(arr, arr + nn, p[i].mx) - arr;
    int num = calc(id + 1);
    if (p[i].flag) smax(ans, num + 1);
    update(id, num + 1);
  }
  println(ans);
}
