#include <bits/stdc++.h>
using namespace std;
const int maxN = 100005;
long long a[maxN], b[maxN], r[maxN], p[maxN], t[maxN];
int c[maxN], sa[maxN], f[maxN], n, m, v;
void init() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%I64d%I64d", p + i, t + i);
  scanf("%d", &v);
  for (int i = 1; i <= n; ++i) {
    a[i] = p[i] - t[i] * v;
    b[i] = p[i] + t[i] * v;
    r[++m] = a[i];
  }
  sort(r + 1, r + 1 + m);
  m = unique(r + 1, r + 1 + m) - r - 1;
}
bool cmpB(int i, int j) { return b[i] > b[j] || (b[i] == b[j] && t[i] > t[j]); }
int ask(int x) {
  int s = 0;
  for (; x; x -= x & (-x)) s = ((s) > (c[x]) ? (s) : (c[x]));
  return s;
}
void chg(int x, int d) {
  for (; x <= m; x += x & (-x)) c[x] = ((c[x]) > (d) ? (c[x]) : (d));
}
void work() {
  int a1 = 0, a2 = 0;
  for (int i = 1; i <= n; ++i) sa[i] = i;
  sort(sa + 1, sa + 1 + n, cmpB);
  for (int j = 1; j <= n; ++j) {
    int i = sa[j], k;
    k = lower_bound(r + 1, r + 1 + m, a[i]) - r;
    f[i] = ask(k) + 1;
    chg(k, f[i]);
    a2 = ((a2) > (f[i]) ? (a2) : (f[i]));
  }
  for (int i = 1; i <= n; ++i)
    if (t[i] * v >= ((p[i]) > 0 ? (p[i]) : (-(p[i]))))
      a1 = ((a1) > (f[i]) ? (a1) : (f[i]));
  printf("%d %d\n", a1, a2);
}
int main() {
  init();
  work();
  return 0;
}
