#include <bits/stdc++.h>
using namespace std;
struct node {
  long long x, y;
} a[100010], b[100010];
long long n, V, cnt, x[100010], t[100010];
multiset<long long> S;
multiset<long long>::iterator it;
inline bool cmp(node x, node y) { return x.x == y.x ? x.y < y.y : x.x < y.x; }
signed main() {
  scanf("%lld", &n);
  for (long long i = 1; i <= n; i++) scanf("%lld%lld", &x[i], &t[i]);
  scanf("%lld", &V);
  for (long long i = 1; i <= n; i++) {
    if (V * t[i] + x[i] >= 0 && V * t[i] - x[i] >= 0)
      a[++cnt] = (node){V * t[i] - x[i], V * t[i] + x[i]};
    b[i] = (node){V * t[i] - x[i], V * t[i] + x[i]};
  }
  sort(a + 1, a + cnt + 1, cmp);
  for (long long i = 1; i <= cnt; i++) {
    it = S.upper_bound(a[i].y);
    if (it != S.end()) S.erase(it);
    S.insert(a[i].y);
  }
  printf("%d ", (signed)S.size());
  S.clear();
  sort(b + 1, b + n + 1, cmp);
  for (long long i = 1; i <= n; i++) {
    it = S.upper_bound(b[i].y);
    if (it != S.end()) S.erase(it);
    S.insert(b[i].y);
  }
  printf("%d", (signed)S.size());
  return 0;
}
