#include <bits/stdc++.h>
using namespace std;
const int maxn = 110000;
int n, V;
struct Tcxx {
  long long x, t;
} A[maxn];
namespace Ninit {
void init() {
  int i;
  scanf("%d", &n);
  for (i = 1; i <= n; ++i) cin >> A[i].x >> A[i].t;
  scanf("%d", &V);
}
}  // namespace Ninit
namespace Nsolve {
int m, an0;
long long B[maxn];
inline bool cmp(const Tcxx &a, const Tcxx &b) {
  return a.t * V + a.x != b.t * V + b.x ? a.t * V + a.x > b.t * V + b.x
                                        : a.t * V - a.x > b.t * V - b.x;
}
void solve() {
  int l, r, mid, i;
  long long x;
  sort(A + 1, A + n + 1, cmp);
  for (m = 1, B[0] = 1e18, i = 1; i <= n; ++i) {
    x = A[i].t * V - A[i].x;
    for (l = 0, r = m; l + 1 < r; x <= B[mid] ? l = mid : r = mid)
      mid = l + r >> 1;
    if (l + 1 == m)
      B[m++] = x;
    else
      B[l + 1] = max(B[l + 1], x);
    if (A[i].t * V >= abs(A[i].x)) an0 = max(an0, l + 1);
  }
  cout << an0 << ' ' << m - 1 << endl;
}
}  // namespace Nsolve
int main() {
  Ninit::init();
  Nsolve::solve();
  return 0;
}
