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;
inline int read() {
  int x = 0, f = 0;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = 1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
  if (f == 1) x = -x;
  return x;
}
struct node {
  long long x, y;
} p[100005];
inline bool cmp(node a, node b) {
  if (a.x != b.x) return a.x < b.x;
  return a.y < b.y;
}
int x[100005], t[100005], n, v;
long long d[100005];
inline int max(int a, int b) { return a > b ? a : b; }
inline long long min(long long a, long long b) { return a < b ? a : b; }
inline int lis(int o) {
  int i, sz;
  memset(d, 0x3f, sizeof(d));
  sz = 0;
  d[0] = -123456789987654321ll;
  for (i = 1; i <= o; i++) {
    int l = 0, r = sz;
    while (l <= r) {
      int mid = (l + r) >> 1;
      if (d[mid] > p[i].y) {
        r = mid - 1;
      } else {
        l = mid + 1;
      }
    }
    sz = max(sz, r + 1);
    d[r + 1] = min(d[r + 1], p[i].y);
  }
  return sz;
}
int main() {
  int i;
  n = read();
  for (i = 1; i <= n; i++) {
    x[i] = read();
    t[i] = read();
  }
  v = read();
  for (i = 1; i <= n; i++) {
    p[i].x = 1ll * t[i] * v - x[i];
    p[i].y = 1ll * t[i] * v + x[i];
  }
  sort(p + 1, p + n + 1, cmp);
  int ans1, ans2, cnt = 0;
  ans2 = lis(n);
  for (i = 1; i <= n; i++) {
    if (p[i].x >= 0 && p[i].y >= 0) {
      p[++cnt] = p[i];
    }
  }
  ans1 = lis(cnt);
  printf("%d %d\n", ans1, ans2);
  return 0;
}
