#include <bits/stdc++.h>
using namespace std;
const long long MAXN = (1 << 20);
template <class T>
struct fenwick {
  long long sz;
  T tr[MAXN];
  void init(long long n) {
    sz = n + 1;
    memset(tr, 0, sizeof(tr));
  }
  void update(long long idx, T val) {
    if (idx <= 0) return;
    for (; idx <= sz; idx += (idx & -idx)) tr[idx] = max(tr[idx], val);
  }
  T query(long long idx) {
    T ret = 0;
    for (; idx >= 1; idx -= (idx & -idx)) ret = max(ret, tr[idx]);
    return ret;
  }
};
template <class T>
void compress(vector<T>& vec) {
  sort(vec.begin(), vec.end());
  vec.erase(unique(vec.begin(), vec.end()), vec.end());
}
template <class T>
long long get_id(vector<T>& vec, T val) {
  return lower_bound(vec.begin(), vec.end(), val) - vec.begin();
}
long long n, v;
pair<long long, long long> a[MAXN];
pair<long long, long long> vec[MAXN];
void read() {
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> a[i].second >> a[i].first;
  cin >> v;
}
long long f[MAXN], s[MAXN];
fenwick<long long> t[2];
void solve() {
  for (long long i = 0; i < 2; i++) t[i].init(2 * n);
  sort(a, a + n);
  vector<long long> fir, sec;
  fir.push_back(0);
  sec.push_back(0);
  for (long long i = 0; i < n; i++) {
    sec.push_back(a[i].first * v - a[i].second);
    s[i] = a[i].first * v - a[i].second;
    fir.push_back(a[i].first * v + a[i].second);
    f[i] = a[i].first * v + a[i].second;
  }
  compress(fir);
  compress(sec);
  long long st_s = get_id(sec, 0ll) + 1;
  long long st_f = get_id(fir, 0ll) + 1;
  for (long long i = 0; i < n; i++) {
    f[i] = get_id(fir, f[i]) + 1;
    s[i] = get_id(sec, s[i]) + 1;
  }
  vec[0] = {st_f, st_s};
  for (long long i = 0; i < n; i++) vec[i + 1] = {f[i], s[i]};
  sort(vec, vec + n + 1);
  for (long long i = 0; i < n + 1; i++) {
    long long dp0, dp1, u = vec[i].second;
    dp0 = t[0].query(u) + 1;
    dp1 = t[1].query(u) + 1;
    if (dp0 > 1 || (u == st_s && st_f == vec[i].first)) t[0].update(u, dp0);
    if (!(u == st_s && st_f == vec[i].first)) t[1].update(u, dp1);
  }
  cout << t[0].query(t[0].sz) - 1 << " ";
  cout << t[1].query(t[1].sz) << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  read();
  solve();
  return 0;
}
