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;
template <class T>
inline void get(T &n) {
  char c = getchar();
  while (c != '-' && (c < '0' || c > '9')) c = getchar();
  n = 0;
  T s = 1;
  if (c == '-') s = -1, c = getchar();
  while (c >= '0' && c <= '9') n *= 10, n += c - '0', c = getchar();
  n *= s;
}
const int maxn = 100010;
int n, m, v, a[maxn], b[maxn];
vector<long long> x;
pair<int, int> e[maxn], f[maxn];
const int T_maxn = maxn * 2;
struct Trray {
  int c[T_maxn + 10];
  inline int bit(int x) { return x & (-x); }
  inline void clear() {
    int i;
    for (i = (1); i <= (m); ++i) c[i] = -int(~0U >> 1);
  }
  int fix(int i, int k) {
    for (; i <= m; i += bit(i)) c[i] = max(c[i], k);
  }
  int pf(int i) {
    int r = -int(~0U >> 1);
    for (; i; i -= bit(i)) r = max(r, c[i]);
    return r;
  }
} ta;
int Find(int k) { return lower_bound(x.begin(), x.end(), k) - x.begin() + 1; }
void dp0() {
  int i, j, k, t;
  ta.clear();
  ta.fix(m - f[0].first + 1, 0);
  for (i = (1); i <= (n); ++i) {
    t = ta.pf(m - f[i].first + 1);
    ta.fix(m - f[i].first + 1, t + 1);
  }
}
void dp1() {
  int i, j, k, t;
  ta.clear();
  for (i = (1); i <= (n); ++i) {
    t = ta.pf(m - f[i].first + 1);
    if (t < 0) t = 0;
    ta.fix(m - f[i].first + 1, t + 1);
  }
}
bool cmp(pair<int, int> a, pair<int, int> b) {
  return a.second == b.second ? a.first > b.first : a.second < b.second;
}
int main() {
  int i, j, k, t, tt;
  get(n);
  e[0] = pair<int, int>(0, 0);
  for (i = (1); i <= (n); ++i) {
    get(e[i].second);
    get(e[i].first);
  }
  sort(e + 1, e + n + 1);
  get(v);
  x.clear();
  for (i = (0); i <= (n); ++i) {
    x.push_back((e[i].second + long long(e[i].first) * v));
    x.push_back((e[i].second - long long(e[i].first) * v));
  }
  sort(x.begin(), x.end());
  x.resize(unique(x.begin(), x.end()) - x.begin());
  m = int((x).size());
  for (i = (0); i <= (n); ++i)
    f[i].first = Find((e[i].second + long long(e[i].first) * v)),
    f[i].second = Find((e[i].second - long long(e[i].first) * v));
  sort(f, f + n + 1, cmp);
  dp0();
  printf("%d ", ta.pf(m));
  dp1();
  printf("%d\n", ta.pf(m));
  return 0;
}
