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 vi = std::vector<long long int>;
using vvi = std::vector<vi>;
using pii = std::pair<long long int, long long int>;
using vpii = std::vector<pii>;
using vvpii = std::vector<vpii>;
using namespace std;
const long long int N = 2e6 + 10;
const long long int inf = 1e18 + 10;
const long double Pi = 3.14159265;
bool c = 0;
long long int n;
pii q[N];
long long int lis() {
  multiset<long long int> x;
  for (long long int i = 1; i <= n + 1 - 1; i++) {
    if (c == 1 and (q[i].first < 0 or q[i].second < 0)) continue;
    auto it = x.upper_bound(q[i].second);
    if (x.end() != it) x.erase(it);
    x.insert(q[i].second);
  }
  long long int ans = 0;
  return x.size();
}
long long int x[N], t[N], v;
void solve() {
  cin >> n;
  bool ok = 0;
  for (long long int i = 1; i <= n; i++) {
    cin >> x[i] >> t[i];
    if (x[i] == 0 and t[i] == 0) ok = 1;
  }
  cin >> v;
  for (long long int i = 1; i <= n; i++) {
    q[i] = {-x[i] + v * t[i], x[i] + v * t[i]};
  }
  sort(q + 1, q + 1 + n);
  long long int ans = lis();
  c = 1;
  cout << lis() << " " << ans;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  solve();
  long long int xx = 0;
  return 0;
}
