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 std::sort;
const int fin = 0, maxn = 100010;
int n;
struct rec {
  int x, y;
} a[maxn];
int f[maxn];
inline bool cmp(const rec &a, const rec &b) {
  return (a.x == b.x) ? (a.y > b.y) : (a.x > b.x);
}
int main() {
  if (fin) {
    freopen("t.in", "r", stdin);
    freopen("t.out", "w", stdout);
  }
  int ans, tans, i, x, y, l, r, m, V, w;
  scanf("%d", &n);
  for (i = 1; i <= n; ++i) scanf("%d%d", &a[i].x, &a[i].y);
  scanf("%d", &V);
  for (i = 1; i <= n; ++i) {
    x = a[i].x, y = a[i].y;
    a[i].x = V * y + x, a[i].y = V * y - x;
  }
  sort(a + 1, a + n + 1, cmp);
  ans = 0;
  for (i = 1; i <= n; ++i) {
    w = a[i].y;
    for (l = 1, r = ans; l <= r;)
      if (m = l + r >> 1, f[m] >= w)
        l = m + 1;
      else
        r = m - 1;
    f[l] = w;
    if (l > ans) ans = l;
  }
  tans = ans, ans = 0;
  a[n + 1].x = a[n + 1].y = 0;
  sort(a + 1, a + n + 2, cmp);
  for (i = 1; i <= n + 1; ++i) {
    w = a[i].y;
    for (l = 1, r = ans; l <= r;)
      if (m = l + r >> 1, f[m] >= w)
        l = m + 1;
      else
        r = m - 1;
    f[l] = w;
    if (l > ans) ans = l;
    if (a[i].x == 0 && a[i].y == 0) break;
  }
  printf("%d %d", l - 1, tans);
  return 0;
}
