#include <bits/stdc++.h>
using namespace std;
const int maxn = 201000;
struct Point {
  long long x, y;
  bool operator<(Point a) const {
    if (x != a.x) return x < a.x;
    return y < a.y;
  }
} p[maxn];
int x[maxn], t[maxn];
int LIS(int n) {
  multiset<long long> st;
  multiset<long long>::iterator it;
  for (int i = 0; i < n; i++) {
    it = st.upper_bound(p[i].y);
    if (it != st.end()) st.erase(it);
    st.insert(p[i].y);
  }
  return st.size();
}
int main() {
  int n;
  long long V;
  while (scanf("%d", &n) == 1) {
    for (int i = 0; i < n; i++) scanf("%d%d", &x[i], &t[i]);
    scanf("%I64d", &V);
    int tot = 0;
    for (int i = 0; i < n; i++)
      if (V * t[i] + x[i] >= 0 && V * t[i] - x[i] >= 0) {
        p[tot].x = V * t[i] + x[i];
        p[tot++].y = V * t[i] - x[i];
      }
    sort(p, p + tot);
    int ans1 = LIS(tot);
    for (int i = 0; i < n; i++) {
      p[i].x = V * t[i] + x[i];
      p[i].y = V * t[i] - x[i];
    }
    sort(p, p + n);
    int ans2 = LIS(n);
    printf("%d %d\n", ans1, ans2);
  }
  return 0;
}
