#include <bits/stdc++.h>
using namespace std;
struct point {
  double x, y;
};
point a[100010];
double d[100010];
int v[100010];
int cmp(const point &a, const point &b) {
  if (fabs(a.x - b.x) < 1e-9)
    return a.y > b.y;
  else
    return a.x < b.x;
}
void intersect(double &x, double &y, double a1, double b1, double c1, double a2,
               double b2, double c2) {
  c1 = -c1;
  c2 = -c2;
  if (abs(a1) < 1e-9) {
    y = c1 / b1;
    x = (c2 - b2 * y) / a2;
  } else if (abs(b1) < 1e-9) {
    x = c1 / a1;
    y = (c2 - a2 * x) / b2;
  } else if (abs(a2) < 1e-9) {
    y = c2 / b2;
    x = (c1 - b1 * y) / a1;
  } else if (abs(b2) < 1e-9) {
    x = c2 / a2;
    y = (c1 - a1 * x) / b1;
  } else {
    y = (c1 * a2 - c2 * a1) / (b1 * a2 - b2 * a1);
    x = (c1 - b1 * y) / a1;
  }
}
int find(int n, double x) {
  int left = 1, right = n;
  while (1) {
    int mid = (left + right) / 2;
    if (abs(d[mid] - x) < 1e-9) return mid;
    if (x > d[mid])
      left = mid + 1;
    else
      right = mid - 1;
  }
}
int ta[100010];
int query(int x) {
  int rs = -1000000000;
  while (x) rs = max(rs, ta[x]), x -= x & -x;
  return rs;
}
void insert(int n, int x, int y) {
  while (x <= n) ta[x] = max(ta[x], y), x += x & -x;
}
void lemon() {
  int n;
  scanf("%d", &n);
  int ca = 0;
  int aa, bb, cc, dd;
  scanf("%d/%d %d/%d", &aa, &bb, &cc, &dd);
  swap(aa, bb);
  swap(cc, dd);
  for (int i = (1); i <= (n); i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    double rx, ry;
    int flag = 1;
    intersect(rx, ry, dd, -cc, double(y) * cc - double(x) * dd, bb, -aa, 0);
    if (rx < 0 || ry < 0) flag = 0;
    ca++;
    a[ca].x = rx * rx + ry * ry;
    intersect(rx, ry, bb, -aa, double(y) * aa - double(x) * bb, dd, -cc, 0);
    if (rx < 0 || ry < 0) flag = 0;
    a[ca].y = rx * rx + ry * ry;
    if (!flag) ca--;
  }
  n = ca;
  sort(a + 1, a + n + 1, cmp);
  for (int i = (1); i <= (n); i++) d[i] = a[i].y;
  d[n + 1] = 0;
  sort(d + 1, d + n + 2);
  int cn = 1;
  for (int i = (2); i <= (n + 1); i++)
    if (fabs(d[i] - d[cn]) > 1e-9) d[++cn] = d[i];
  for (int i = (1); i <= (n); i++) v[i] = find(cn, a[i].y);
  v[0] = find(cn, 0);
  for (int i = (1); i <= (cn); i++) ta[i] = -1000000000;
  insert(cn, v[0], 0);
  int final = 0;
  for (int i = (1); i <= (n); i++) {
    int x = query(v[i] - 1) + 1;
    final = max(final, x);
    insert(cn, v[i], x);
  }
  printf("%d\n", final);
}
int main() {
  ios::sync_with_stdio(true);
  lemon();
  return 0;
}
