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 int maxN = 100 * 1000 + 100;
long long n, v, x[maxN], t[maxN], a, maxa, y, dp[maxN], maxb, z;
pair<long long, long long> p[maxN];
void bsearch(long long s, long long e) {
  if (s >= e) {
    a = s;
    return;
  }
  long long mid = (s + e) / 2;
  if (dp[mid] > y && dp[mid - 1] <= y) {
    a = mid;
    return;
  }
  if (y > dp[mid]) {
    s = mid + 1;
    bsearch(s, e);
  } else {
    e = mid;
    bsearch(s, e);
  }
}
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 = x[i] + (v * t[i]);
    p[i].second = (v * t[i]) - x[i];
  }
  for (int i = 1; i < n; i++) dp[i] = maxN * 100000;
  dp[0] = dp[1] * -1;
  sort(p + 1, p + n + 1);
  for (int i = 1; i <= n; i++) {
    y = p[i].second;
    bsearch(0, n);
    dp[a] = y;
    maxa = max(maxa, a);
  }
  for (int i = 1; i <= n + 100; i++) {
    dp[i] = maxN * 100000;
    p[i].first = 0;
    p[i].second = 0;
  }
  for (int i = 1; i <= n; i++)
    if ((x[i] + (v * t[i])) >= 0 && ((v * t[i]) - x[i]) >= 0) {
      z++;
      p[z].first = x[i] + (v * t[i]);
      p[z].second = (v * t[i]) - x[i];
    }
  sort(p + 1, p + z + 1);
  a = 0;
  for (int i = 1; i <= z; i++) {
    y = p[i].second;
    bsearch(0, z);
    dp[a] = y;
    maxb = max(maxb, a);
  }
  cout << maxb << "  " << maxa << endl;
  return 0;
}
