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 namespace std;
const long long MAXN = (1 << 20);
template <class T>
struct fenwick {
  long long sz;
  T tr[MAXN];
  void init(long long n) {
    sz = n + 1;
    memset(tr, 0, sizeof(tr));
  }
  void update(long long idx, T val) {
    if (idx <= 0) return;
    for (; idx <= sz; idx += (idx & -idx)) tr[idx] = max(tr[idx], val);
  }
  T query(long long idx) {
    T ret = 0;
    for (; idx >= 1; idx -= (idx & -idx)) ret = max(ret, tr[idx]);
    return ret;
  }
};
template <class T>
void compress(vector<T>& vec) {
  sort(vec.begin(), vec.end());
  vec.erase(unique(vec.begin(), vec.end()), vec.end());
}
template <class T>
long long get_id(vector<T>& vec, T val) {
  return lower_bound(vec.begin(), vec.end(), val) - vec.begin();
}
long long n, v;
pair<long long, long long> a[MAXN];
pair<long long, long long> vec[MAXN];
void read() {
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> a[i].second >> a[i].first;
  cin >> v;
}
long long f[MAXN], s[MAXN];
fenwick<long long> t[4];
void solve() {
  for (long long i = 0; i < 2; i++) t[i].init(2 * n);
  sort(a, a + n);
  vector<long long> fir, sec;
  fir.push_back(0);
  sec.push_back(0);
  for (long long i = 0; i < n; i++) {
    fir.push_back(a[i].first * v - a[i].second);
    f[i] = a[i].first * v - a[i].second;
    sec.push_back(a[i].first * v + a[i].second);
    s[i] = a[i].first * v + a[i].second;
  }
  compress(fir);
  compress(sec);
  long long st_s = get_id(sec, 0ll) + 1;
  long long st_f = get_id(fir, 0ll) + 1;
  for (long long i = 0; i < n; i++) {
    f[i] = get_id(fir, f[i]) + 1;
    s[i] = get_id(sec, s[i]) + 1;
  }
  vec[0] = {st_f, st_s};
  for (long long i = 0; i < n; i++) vec[i + 1] = {f[i], s[i]};
  sort(vec, vec + n + 1);
  for (long long i = 0; i < n + 1; i++) {
    long long dp0, dp1, u = vec[i].second;
    dp0 = t[0].query(u) + 1;
    dp1 = t[1].query(u) + 1;
    if (dp0 > 1 || (u == st_s && st_f == vec[i].first)) t[0].update(u, dp0);
    t[1].update(u, dp1);
  }
  cout << t[0].query(t[0].sz) - 1 << " ";
  cout << t[1].query(t[1].sz) << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  read();
  solve();
  return 0;
}
