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;
struct node {
  long long int p, q;
};
bool compare(node x, node y) {
  if (x.p != y.p) return x.p < y.p;
  return x.q < y.q;
}
node a[100009 + 1];
int pos[100009 + 1];
int lis(int l, int r, int sz) {
  int ans = 0;
  while (l <= r) {
    int mid = (l + r) / 2;
    if (a[pos[mid]].q <= a[sz].q)
      l = mid + 1;
    else {
      ans = mid;
      r = mid - 1;
    }
  }
  return ans;
}
int solve(int n) {
  int total = 0, result = 0;
  for (int i = 0; i <= 100009; i++) pos[i] = 0;
  for (int i = 1; i <= n; i++) {
    if (total == 0) {
      if (a[0].p <= a[i].p && a[0].q <= a[i].q) {
        total++;
        pos[total] = i;
      }
      continue;
    }
    if (a[pos[total]].q <= a[i].q) {
      total++;
      pos[total] = i;
    } else {
      int position = lis(1, total, i);
      if (position == 1) {
        if (a[0].p <= a[i].p && a[0].q <= a[i].q) pos[position] = i;
      } else
        pos[position] = i;
    }
    result = max(result, total);
  }
  return result;
}
int main() {
  int n;
  cin >> n;
  int x[n + 1], tim[n + 1], v;
  for (int i = 1; i <= n; i++) cin >> x[i] >> tim[i];
  cin >> v;
  for (int i = 1; i <= n; i++) {
    a[i].p = x[i] + tim[i] * v;
    a[i].q = -x[i] + tim[i] * v;
  }
  sort(a + 1, a + 1 + n, compare);
  a[0].p = 0;
  a[0].q = 0;
  int result1 = solve(n);
  cout << result1 << " ";
  a[0].p = -1000000000;
  a[0].q = -1000000000;
  int result2 = solve(n);
  cout << result2 << "\n";
  return 0;
}
