#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, Vi;
  cin >> n;
  vector<pair<long long, long long> > v(n);
  vector<long long> x(n), t(n), b;
  for (int i = 0; i < n; i++) {
    scanf("%I64d %I64d", &x[i], &t[i]);
  }
  cin >> Vi;
  for (int i = 0; i < n; i++) {
    v[i] = make_pair(-x[i] + t[i] * Vi, x[i] + t[i] * Vi);
  }
  v.push_back(make_pair(0, 0));
  sort(v.rbegin(), v.rend());
  int ret0 = 0, ret = 0;
  for (int i = 0; i < (int)v.size(); i++) {
    int pos =
        upper_bound(b.begin(), b.end(), v[i].second, greater<long long>()) -
        b.begin();
    if (pos == b.size()) {
      b.push_back(v[i].second);
    } else {
      b[pos] = v[i].second;
    }
    if (!v[i].first && !v[i].second) {
      ret0 = pos;
    } else {
      ret = max(ret, pos + 1);
    }
  }
  printf("%d %d\n", ret0, ret);
  return 0;
}
