#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 ? P.V1 < Q.V1 : 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;
  }
  res = max(res, top);
  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);
}
