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;
int getint() {
  int ret = 0;
  bool ok = false, neg = false;
  for (;;) {
    int c = getchar();
    if (c >= '0' && c <= '9')
      ret = (ret << 3) + ret + ret + c - '0', ok = true;
    else if (ok)
      return neg ? -ret : ret;
    else if (c == '-')
      neg = true;
  }
}
int n;
int V;
const int maxn = 100010;
int x[maxn], t[maxn];
pair<int, int> P[maxn];
map<int, int> M;
inline int query(int x) {
  map<int, int>::iterator i = M.lower_bound(x);
  if (i == M.end()) return 0;
  return i->second;
}
inline void insert(int i, int x) {
  map<int, int>::iterator p = M.lower_bound(i);
  if (p != M.end() && p->second >= x) return;
  M[i] = x;
  p = M.find(i);
  for (;;) {
    if (p == M.begin()) return;
    map<int, int>::iterator pp = p;
    pp--;
    if (pp->second > x) return;
    M.erase(pp);
  }
}
int ans, ans0;
inline bool cmp(const pair<int, int> &k1, const pair<int, int> &k2) {
  return k1.first == k2.first ? k1.second > k2.second : k1.first < k2.first;
}
int main() {
  n = getint();
  for (int i = 1; i <= n; i++) x[i] = getint(), t[i] = getint();
  V = getint();
  n++;
  for (int i = 1; i <= n; i++)
    P[i] = make_pair(x[i] - V * t[i], x[i] + V * t[i]);
  sort(P + 1, P + n + 1, cmp);
  for (int i = 1; i <= n; i++) {
    int tans = query(P[i].second) + 1;
    if (P[i] == make_pair(0, 0))
      ans0 = tans - 1;
    else
      insert(P[i].second, tans), ans = max(ans, tans);
  }
  printf("%d\n%d\n", ans0, ans);
  return 0;
}
