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;
int N, V, Xn;
pair<int, int> P[100010];
vector<int> X;
map<int, int> dx;
void Add(pair<int, int> v, multiset<pair<int, int> > &st) {
  set<pair<int, int> >::iterator it =
      st.upper_bound(pair<int, int>(v.first, 1e9));
  if (it != st.begin()) {
    it--;
    if (it->second >= v.second) return;
  }
  while (1) {
    it = st.upper_bound(pair<int, int>(v.first, 1e9));
    if (it == st.end() || it->second > v.second) break;
    pair<int, int> tmp = *it;
    st.erase(st.find(tmp));
  }
  st.insert(v);
}
struct BIT {
  vector<multiset<pair<int, int> > > tree;
  void init() {
    tree =
        vector<multiset<pair<int, int> > >(4 * Xn, multiset<pair<int, int> >());
  }
  void upd(int idx, pair<int, int> val, int l, int r, int n) {
    if (idx < l || r < idx) return;
    Add(val, tree[n]);
    if (l == r) return;
    int m = (l + r) >> 1;
    upd(idx, val, l, m, 2 * n);
    upd(idx, val, m + 1, r, 2 * n + 1);
  }
  int quer(int a, int b, int x, int l, int r, int n) {
    if (b < l || r < a) return 0;
    if (a <= l && r <= b) {
      multiset<pair<int, int> >::iterator it =
          tree[n].upper_bound(pair<int, int>(x, 1e9));
      if (it == tree[n].begin())
        return 0;
      else
        return (--it)->second;
    }
    int m = (l + r) >> 1;
    int L = quer(a, b, x, l, m, 2 * n);
    int R = quer(a, b, x, m + 1, r, 2 * n + 1);
    return max(L, R);
  }
} bit1, bit2;
int dp[100010];
int main() {
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    scanf("%d %d", &P[i].second, &P[i].first);
    X.push_back(P[i].second);
  }
  P[N++] = pair<int, int>(0, 0);
  scanf("%d", &V);
  sort(X.begin(), X.end());
  X.resize(unique(X.begin(), X.end()) - X.begin());
  Xn = X.size();
  for (int i = 0; i < Xn; i++) dx[X[i]] = i;
  for (int i = 0; i < N; i++) {
    P[i].second = dx[P[i].second];
  }
  sort(P, P + N);
  bit1.init();
  bit2.init();
  for (int i = N - 1; i >= 0; i--) {
    dp[i] = max(dp[i], 1 + bit1.quer(P[i].second, Xn - 1, X[P[i].second], 0,
                                     Xn - 1, 1));
    dp[i] = max(dp[i],
                1 + bit2.quer(0, P[i].second, -X[P[i].second], 0, Xn - 1, 1));
    bit1.upd(P[i].second,
             pair<int, int>(X[P[i].second] - P[i].first * V, dp[i]), 0, Xn - 1,
             1);
    bit2.upd(P[i].second,
             pair<int, int>(-X[P[i].second] - P[i].first * V, dp[i]), 0, Xn - 1,
             1);
  }
  int ans = 0;
  for (int i = 1; i < N; i++) ans = max(ans, dp[i]);
  printf("%d %d", dp[0] - 1, ans);
}
