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>
const int MAXN = 210000;
inline int min(const int &a, const int &b) { return a < b ? a : b; }
inline int max(const int &a, const int &b) { return a > b ? a : b; }
int pos[MAXN][2];
int n, v, tot = 0;
struct Seg {
  int l, r;
} lines[MAXN];
inline bool operator<(const Seg &a, const Seg &b) {
  if (a.r == b.r) return a.l > b.l;
  return a.r < b.r;
}
int lis[MAXN], f[MAXN];
int yy[MAXN * 2], sc[MAXN * 2];
inline int lowbit(const int &a) { return a & -a; }
void set(int *c, int p, int v) {
  while (p) {
    c[p] = max(c[p], v);
    p -= lowbit(p);
  }
}
int query(int *c, int p) {
  int ret = 0;
  while (p <= tot) {
    ret = max(ret, c[p]);
    p += lowbit(p);
  }
  return ret;
}
inline bool cmp(const int &a, const int &b) { return sc[a] < sc[b]; }
inline bool cmp2(const int &a, const int &b) { return lines[a] < lines[b]; }
int main() {
  scanf("%d", &n);
  int mxt = 0;
  for (int i = 1; i <= n; i++)
    scanf("%d%d", &pos[i][0], &pos[i][1]), mxt = max(mxt, pos[i][1]);
  scanf("%d", &v);
  for (int i = 1; i <= n; i++) {
    lines[i].l = pos[i][0] - pos[i][1] * v;
    lines[i].r = pos[i][0] + pos[i][1] * v;
    sc[(i << 1) - 1] = lines[i].l;
    sc[i << 1] = lines[i].r;
    yy[(i << 1) - 1] = (i << 1) - 1;
    yy[i << 1] = i << 1;
  }
  n++;
  lines[n].r = 0;
  lines[n].l = 0;
  sc[(n << 1) - 1] = lines[n].l;
  sc[n << 1] = lines[n].r;
  yy[(n << 1) - 1] = (n << 1) - 1;
  yy[n << 1] = n << 1;
  std::sort(yy + 1, yy + ((n << 1) + 1), cmp);
  sc[0] = -17194721;
  for (int i = 1; i <= (n << 1); i++) {
    if (sc[yy[i - 1]] != sc[yy[i]]) tot++;
    if (yy[i] & 1)
      lines[(yy[i] + 1) >> 1].l = tot;
    else
      lines[(yy[i] + 1) >> 1].r = tot;
  }
  for (int i = 1; i <= n; i++) yy[i] = i;
  std::sort(yy + 1, yy + (n + 1), cmp2);
  int ans1 = 0;
  for (int i = 1; i <= n; i++) {
    if (!(lines[yy[i]].l <= lines[n].l && lines[yy[i]].r >= lines[n].r) ||
        yy[i] == n)
      continue;
    f[yy[i]] = query(lis, lines[yy[i]].l) + 1;
    set(lis, lines[yy[i]].l, f[yy[i]]);
    ans1 = max(ans1, f[yy[i]]);
  }
  int ans2 = 0;
  memset(lis, 0, sizeof lis);
  memset(f, 0, sizeof f);
  for (int i = 1; i <= n; i++) {
    if (yy[i] == n) continue;
    f[yy[i]] = query(lis, lines[yy[i]].l) + 1;
    set(lis, lines[yy[i]].l, f[yy[i]]);
    ans2 = max(ans2, f[yy[i]]);
  }
  printf("%d %d\n", ans1, ans2);
}
