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;
ifstream fin("input.txt");
ofstream fout("output.txt");
const long long mod = 1000000000 + 7;
const int maxn = 100000 + 10;
const int D = 300017;
const long long inf = 20000000000000ll;
long long n, v, x[maxn], t[maxn], d[maxn], q[maxn], dd[maxn];
pair<long long, long long> p[maxn], pp[maxn];
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> x[i] >> t[i];
  cin >> v;
  for (int i = 1; i <= n; i++) {
    p[i].first = t[i] * v + x[i];
    p[i].second = t[i] * v - x[i];
  }
  for (int i = 1; i <= n; i++) {
    pp[i].first = p[i].first;
    pp[i].second = p[i].second;
  }
  p[n + 1].first = p[n + 1].second = 0;
  sort(p + 1, p + 2 + n);
  for (int i = 1; i <= n + 5; i++) d[i] = inf;
  for (int i = 1; i <= n + 1; i++) q[i] = p[i].second;
  int j = 1;
  while (q[j] != 0) j++;
  for (int i = j; i <= n + 1; i++) {
    int r = lower_bound(d + 1, d + 2 + n, q[i]) - d;
    if (d[r] == inf)
      d[r] = q[i];
    else
      d[r] = q[i];
  }
  sort(pp + 1, pp + 1 + n);
  for (int i = 1; i <= n + 5; i++) dd[i] = inf;
  for (int i = 1; i <= n; i++) q[i] = pp[i].second;
  for (int i = 1; i <= n; i++) {
    int r = lower_bound(dd + 1, dd + 1 + n, q[i]) - dd;
    if (dd[r] == inf)
      dd[r] = q[i];
    else
      dd[r] = q[i];
  }
  cout << (lower_bound(d + 1, d + 2 + n, inf) - d - 2) << ' '
       << (lower_bound(dd + 1, dd + 1 + n, inf) - dd) - 1 << endl;
  return 0;
}
