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 N = 100000 + 5;
inline void getint(int& num) {
  char c;
  bool flag = 0;
  num = 0;
  while ((c = getchar()) < '0' || c > '9')
    if (c == '-') flag = 1;
  while (c >= '0' && c <= '9') {
    num = num * 10 + c - 48;
    c = getchar();
  }
  if (flag) num = -num;
}
pair<int, int> event[N];
int n, x, t, v, siz, M, tep[N], f[N], maxi[N];
inline void update(int pos, int val) {
  maxi[pos + M] = max(maxi[pos + M], val), pos += M;
  for (pos = pos >> 1; pos; pos >>= 1)
    maxi[pos] = max(maxi[pos << 1], maxi[pos << 1 | 1]);
}
inline int getmax(int s, int t) {
  if (s == t) return maxi[s + M];
  int L = maxi[s += M], R = maxi[t += M];
  while (s ^ t ^ 1) {
    if (~s & 1) L = max(L, maxi[s ^ 1]);
    if (t & 1) R = max(R, maxi[t ^ 1]);
    s >>= 1, t >>= 1;
  }
  return max(L, R);
}
int main() {
  getint(n);
  for (int i = 1; i <= n; i++) {
    getint(x), getint(t);
    event[i] = make_pair(x, t);
  }
  getint(v);
  for (int i = 1; i <= n; i++) {
    x = event[i].first, t = event[i].second;
    event[i] = make_pair(v * t - x, v * t + x);
    tep[++siz] = event[i].second;
  }
  sort(event + 1, event + n + 1);
  sort(tep + 1, tep + siz + 1);
  siz = unique(tep + 1, tep + siz + 1) - tep - 1;
  for (M = 1; M < siz; M <<= 1)
    ;
  for (int i = 1; i <= n; i++) {
    if (event[i] < make_pair(0, 0)) continue;
    int pos = lower_bound(tep + 1, tep + siz + 1, event[i].second) - tep;
    f[i] = getmax(1, pos) + 1;
    update(pos, f[i]);
  }
  printf("%d ", getmax(1, siz));
  memset(maxi, 0, sizeof maxi);
  memset(f, 0, sizeof f);
  for (int i = n; i; i--) {
    int pos = lower_bound(tep + 1, tep + siz + 1, event[i].second) - tep;
    f[i] = getmax(pos, siz) + 1;
    update(pos, f[i]);
  }
  printf("%d\n", getmax(1, siz));
}
