#include <bits/stdc++.h>
using namespace std;
int LIS(vector<pair<int, int>> vc) {
  vector<int> v;
  for (auto e : vc) {
    int pos = upper_bound(v.begin(), v.end(), e.second) - v.begin();
    if (pos == v.size())
      v.push_back(e.second);
    else
      v[pos] = e.second;
  }
  return v.size();
}
int main() {
  int n, v;
  scanf("%d", &n);
  int arr[n][2];
  for (int i = 0; i < n; i++) scanf("%d %d", &arr[i][0], &arr[i][1]);
  scanf("%d", &v);
  vector<pair<int, int>> v1, v2;
  for (int i = 0; i < n; i++) {
    int x = arr[i][0], t = arr[i][1];
    int p = +x + v * t;
    int q = -x + v * t;
    if (p >= 0 && q >= 0) v1.push_back(make_pair(p, q));
    v2.push_back(make_pair(p, q));
  }
  sort(v1.begin(), v1.end());
  sort(v2.begin(), v2.end());
  printf("%d %d", LIS(v1), LIS(v2));
}
