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 long long ding = 2500000000LL;
const int INF = 10000000;
struct sl {
  int lson, rson, max;
} tree1[5000005], tree2[5000005];
struct csl {
  long long t, x;
} data[100005];
int n, m, z, x, y, f[100005], node1, node2, ans, root;
long long v;
inline bool cmp(csl x, csl y) { return x.t < y.t; }
inline void calc1(int now) {
  tree1[now].max = max(tree1[tree1[now].lson].max, tree1[tree1[now].rson].max);
}
inline void calc2(int now) {
  tree2[now].max = max(tree2[tree2[now].lson].max, tree2[tree2[now].rson].max);
}
inline void ins1(int &now, long long l, long long r, long long x, int v) {
  if (now == 0) now = ++node1;
  if (l == r) {
    tree1[now].max = max(tree1[now].max, v);
    return;
  }
  long long mid = (l + r) >> 1;
  if (x <= mid)
    ins1(tree1[now].lson, l, mid, x, v);
  else
    ins1(tree1[now].rson, mid + 1, r, x, v);
  calc1(now);
}
inline void ins2(int &now, long long l, long long r, long long x, int v) {
  if (now == 0) now = ++node2;
  if (l == r) {
    tree2[now].max = max(tree2[now].max, v);
    return;
  }
  long long mid = (l + r) >> 1;
  if (x <= mid)
    ins2(tree2[now].lson, l, mid, x, v);
  else
    ins2(tree2[now].rson, mid + 1, r, x, v);
  calc2(now);
}
inline int findmax1(int now, long long l, long long r, long long x,
                    long long y) {
  if (x <= l && r <= y) return tree1[now].max;
  long long mid = (l + r) >> 1;
  int ans = -INF;
  if (x <= mid && tree1[now].lson > 0)
    ans = findmax1(tree1[now].lson, l, mid, x, y);
  if (y > mid && tree1[now].rson > 0)
    ans = max(ans, findmax1(tree1[now].rson, mid + 1, r, x, y));
  return ans;
}
inline int findmax2(int now, long long l, long long r, long long x,
                    long long y) {
  if (x <= l && r <= y) return tree2[now].max;
  long long mid = (l + r) >> 1;
  int ans = -INF;
  if (x <= mid && tree2[now].lson > 0)
    ans = findmax2(tree2[now].lson, l, mid, x, y);
  if (y > mid && tree2[now].rson > 0)
    ans = max(ans, findmax2(tree2[now].rson, mid + 1, r, x, y));
  return ans;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%I64d%I64d", &data[i].x, &data[i].t);
  scanf("%I64d", &v);
  sort(data + 1, data + n + 1, cmp);
  root = node1 = node2 = 1;
  ins1(root, 1, ding * 2, ding, 0);
  ins2(root, 1, ding * 2, ding, 0);
  for (int i = 1; i <= n; ++i) {
    f[i] = -INF + 1;
    f[i] = findmax1(root, 1, ding * 2, data[i].x - v * data[i].t + ding,
                    data[i].x + ding) +
           1;
    f[i] = max(f[i], findmax2(root, 1, ding * 2, data[i].x + ding,
                              data[i].x + v * data[i].t + ding) +
                         1);
    if (f[i] > 0)
      ins1(root, 1, ding * 2, data[i].x - data[i].t * v + ding, f[i]);
    if (f[i] > 0)
      ins2(root, 1, ding * 2, data[i].x + data[i].t * v + ding, f[i]);
  }
  ans = 0;
  for (int i = 1; i <= n; ++i) ans = max(ans, f[i]);
  printf("%d ", ans);
  memset(tree1, 0, sizeof(tree1));
  memset(tree2, 0, sizeof(tree2));
  root = node1 = node2 = 1;
  for (int i = 1; i <= n; ++i) {
    f[i] = 1;
    f[i] =
        max(f[i], findmax1(root, 1, ding * 2, data[i].x - v * data[i].t + ding,
                           data[i].x + ding) +
                      1);
    f[i] = max(f[i], findmax2(root, 1, ding * 2, data[i].x + ding,
                              data[i].x + v * data[i].t + ding) +
                         1);
    ins1(root, 1, ding * 2, data[i].x - data[i].t * v + ding, f[i]);
    ins2(root, 1, ding * 2, data[i].x + data[i].t * v + ding, f[i]);
  }
  ans = 0;
  for (int i = 1; i <= n; ++i) ans = max(ans, f[i]);
  printf("%d", ans);
}
