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 MAX_N = 1e5 + 47;
long long n, x[MAX_N], t[MAX_N], v;
struct node {
  node *l, *r;
  long long max;
  node() {
    l = r = nullptr;
    max = -1e6;
  }
  void update() { max = std::max((l ? l->max : 0ll), (r ? r->max : 0ll)); }
};
void update(long long pos, long long x, node *v, long long tl = -1e12,
            long long tr = 1e12) {
  if (tl == tr)
    v->max = max(v->max, x);
  else {
    long long tm = (tl + tr) >> 1;
    if (tm >= pos) {
      if (!v->l) v->l = new node();
      update(pos, x, v->l, tl, tm);
    } else {
      if (!v->r) v->r = new node();
      update(pos, x, v->r, tm + 1, tr);
    }
    v->update();
  }
}
long long get_max(long long l, long long r, node *v, long long tl = -1e12,
                  long long tr = 1e12) {
  if (!v || tl > r || tr < l) return -1e6;
  if (tl >= l && tr <= r) return v->max;
  long long tm = (tl + tr) >> 1;
  return max(get_max(l, r, v->l, tl, tm), get_max(l, r, v->r, tm + 1, tr));
}
void $main() {
  vector<long long> topsort;
  cin >> n;
  topsort.push_back(0);
  for (long long i = 1; i <= n; i++) {
    cin >> x[i] >> t[i];
    topsort.push_back(i);
  }
  cin >> v;
  for (long long i = 1; i <= n; i++) {
    t[i] *= v;
    long long nx = x[i] + t[i];
    long long ny = t[i] - x[i];
    x[i] = nx;
    t[i] = ny;
  }
  sort(topsort.begin(), topsort.end(), [&](long long i, long long j) {
    return (x[i] == x[j] ? (t[i] != t[j] ? t[i] < t[j] : i < j) : x[i] < x[j]);
  });
  node *dp0 = new node();
  node *dp1 = new node();
  for (auto i : topsort) {
    if (i == 0) {
      update(t[i], 0, dp0);
    } else {
      update(t[i], max(1ll, get_max(-1e12, t[i], dp1) + 1), dp1);
      update(t[i], get_max(-1e12, t[i], dp0) + 1, dp0);
    }
  }
  cout << get_max(-1e12, +1e12, dp0) << ' ' << get_max(-1e12, +1e12, dp1);
}
signed main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  $main();
  return 0;
}
