12
-6712 6
2375 73
4643 197
-5660 215
-378 223
2228 307
3305 340
3449 468
-4389 707
-7161 729
-1838 921
-1655 985
730
 5
1 5
6 7
17127 17
17072 42
17042 77
3
 7
-976754 20479
79929143 911181
9598220 82517
-51609349 810257
67416551 266544
-14170975 307690
-15476178 491195
352
 22
-5301 602
-1400 194
-8512 987
-282 962
6484 494
9091 523
-7744 92
6002 461
5053 305
-1339 272
-821 165
9308 785
929 421
8384 883
1266 157
8411 923
-2949 885
7725 687
6859 197
-7630 867
5031 918
5662 410
41

11 12
 2 3
 5 5
 9 9

#include <bits/stdc++.h>
using ll = long long;
using namespace std;
ll find_LIS(vector<ll> a) {
  ll n = a.size();
  if (n == 1) {
    return 1;
  }
  vector<ll> d;
  ll length = 0;
  ll inf = std::numeric_limits<long long>::max();
  ll finf = -inf;
  d.push_back(finf);
  for (ll i = 1; i < n; ++i) {
    d.push_back(inf);
  }
  for (ll i = 0; i < n; ++i) {
    ll j = (long long)(upper_bound(d.begin(), d.end(), a[i]) - d.begin());
    if (j == n) {
      ++length;
      break;
    }
    if (d[j - 1] <= a[i] && a[i] <= d[j]) {
      d[j] = a[i];
      if (j >= length) {
        length = j;
      }
    }
  }
  return length;
}
int main() {
  ll n, v;
  cin >> n;
  vector<ll> pos;
  vector<ll> time;
  for (ll i = 0; i < n; ++i) {
    ll p, k;
    cin >> p >> k;
    pos.push_back(p);
    time.push_back(k);
  }
  cin >> v;
  vector<pair<ll, ll>> pq;
  for (ll i = 0; i < n; ++i) {
    ll p_ = -pos[i] + v * time[i];
    ll q_ = pos[i] + v * time[i];
    pair<ll, ll> p = make_pair(p_, q_);
    pq.push_back(p);
  }
  sort(begin(pq), end(pq));
  vector<ll> f_vec;
  for (ll i = 0; i < pq.size(); ++i) {
    f_vec.push_back(pq[i].second);
  }
  vector<ll> f_vec_1;
  for (ll i = 0; i < pq.size(); ++i) {
    f_vec_1.push_back(pq[i].first);
  }
  ll ans_1 = find_LIS(f_vec);
  ll s = (long long)(upper_bound(f_vec_1.begin(), f_vec_1.end(), 0) -
                     f_vec_1.begin());
  if (s >= 0) {
    vector<ll>::iterator it;
    it = f_vec.begin() + s;
    f_vec.insert(it, 0);
  } else {
    s = 0;
    vector<ll>::iterator it;
    it = f_vec.begin();
    f_vec.insert(it, 0);
  }
  f_vec.erase(f_vec.begin(), f_vec.begin() + s);
  for (ll i = 1; i < f_vec.size(); ++i) {
    if (f_vec[i] < 0) {
      f_vec.erase(f_vec.begin() + i);
    }
  }
  ll ans_2 = find_LIS(f_vec);
  cout << ans_2 - 1 << " " << ans_1;
}
