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 M = 1e5 + 5;
const long long maxn = 5e6 + 5;
const long long mod = 998244353;
const long long inf = 0x7f3f3f3f3f3f3f3f;
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch > '9' || ch < '0') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
inline long long ksm(long long x, long long y, long long z) {
  long long ret = 1;
  while (y) {
    if (y & 1) ret = (ret * x) % z;
    x = (x * x) % z;
    y >>= 1;
  }
  return ret;
}
inline long long ksm(long long x, long long y) {
  long long ret = 1;
  while (y) {
    if (y & 1) ret = (ret * x) % mod;
    x = (x * x) % mod;
    y >>= 1;
  }
  return ret;
}
inline long long INV(long long x) { return ksm(x, mod - 2); }
struct SJ {
  long long T, X;
  long long V1, V2;
} A[M];
long long c[M], b[M];
bool cmp(SJ P, SJ Q) { return P.V2 < Q.V2; }
long long N, v, m;
long long stk[M], top;
long long find(long long l, long long r, long long x) {
  long long ret = 0;
  while (l <= r) {
    long long mid = (l + r) >> 1;
    if (stk[mid] > x)
      ret = mid, r = mid - 1;
    else
      l = mid + 1;
  }
  return ret;
}
void work(long long a[], long long n) {
  long long res = 0;
  stk[0] = -inf;
  stk[1] = inf;
  top = 1;
  for (long long i = 1; i <= n; i++) {
    res = max(res, top);
    long long p = find(0, top, a[i]);
    if (stk[p] > a[i]) stk[p] = a[i];
    if (p >= top) stk[++top] = inf;
  }
  cout << res - 1 << " ";
}
signed main() {
  N = read();
  for (long long i = 1; i <= N; i++) {
    A[i].X = read();
    A[i].T = read();
  }
  v = read();
  for (long long i = 1; i <= N; i++) {
    A[i].V1 = A[i].X + A[i].T * v;
    A[i].V2 = -A[i].X + A[i].T * v;
  }
  sort(A + 1, A + N + 1, cmp);
  for (long long i = 1; i <= N; i++) {
    if (A[i].V1 >= 0 && A[i].V2 >= 0) b[++m] = A[i].V1;
  }
  for (long long i = 1; i <= N; i++) c[i] = A[i].V1;
  work(b, m);
  work(c, N);
}
