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;
#pragma comment(linker, "/stack:16000000")
#pragma warning(disable : 4996)
const int inf = 1 << 25;
const double eps = 1e-9;
vector<int> ids;
vector<pair<int, int> > LR;
vector<int> x, t;
bool cmp(int i, int j) {
  return LR[i].first > LR[j].first ||
         LR[i].first == LR[j].first && LR[i].second < LR[j].second;
}
struct Tree {
  static const int MAXN = 1 << 17;
  int a[2 * MAXN];
  Tree(int val) {
    for (int i = (0); i < (2 * MAXN); ++i) a[i] = val;
  }
  void update(int i, int val) {
    i += MAXN;
    if (a[i] > val) return;
    a[i] = val;
    int p = i >> 1;
    while (p > 0) a[p] = std::max(a[i], a[i ^ 1]), p >>= 1, i >>= 1;
  }
  int max(int i, int j) {
    i += MAXN, j += MAXN;
    int ret = -inf;
    while (i < j) {
      if (i & 1)
        ret = std::max(ret, a[i++]);
      else if (!(j & 1))
        ret = std::max(ret, a[j--]);
      else
        i >>= 1, j >>= 1;
    }
    return std::max(ret, a[i]);
  }
};
int f(bool zeroFirst) {
  Tree T(zeroFirst ? -inf : 0);
  int ans = 0;
  for (int j = (0); j < ((int)ids.size()); ++j) {
    int i = ids[j];
    if (t[i] == 0) {
      if (zeroFirst) T.update(LR[i].second, 0);
      continue;
    }
    int a = 1 + T.max(0, LR[i].second);
    if (a > 0) T.update(LR[i].second, a);
    ans = max(ans, a);
  }
  return ans;
}
int main() {
  int n;
  cin >> n;
  x.resize(n), t.resize(n);
  for (int i = (0); i < (n); ++i) cin >> x[i] >> t[i];
  int V;
  cin >> V;
  LR.resize(n);
  for (int i = (0); i < (n); ++i)
    LR[i] = pair<int, int>(x[i] - V * t[i], x[i] + V * t[i]);
  x.push_back(0);
  t.push_back(0);
  LR.push_back(pair<int, int>(0, 0));
  vector<int> scaling;
  for (int i = (0); i < ((int)LR.size()); ++i) scaling.push_back(LR[i].second);
  sort(scaling.begin(), scaling.end());
  scaling.resize(unique(scaling.begin(), scaling.end()) - scaling.begin());
  for (int i = (0); i < ((int)LR.size()); ++i)
    LR[i].second = lower_bound(scaling.begin(), scaling.end(), LR[i].second) -
                   scaling.begin();
  ids.resize(n + 1);
  for (int i = (0); i < (n + 1); ++i) ids[i] = i;
  sort(ids.begin(), ids.end(), cmp);
  cout << f(true) << " " << f(false) << endl;
  return 0;
}
