#include <bits/stdc++.h>
using vi = std::vector<long long int>;
using vvi = std::vector<vi>;
using pii = std::pair<long long int, long long int>;
using vpii = std::vector<pii>;
using vvpii = std::vector<vpii>;
using namespace std;
const long long int N = 2e6 + 10;
const long long int inf = 1e18 + 10;
const long double Pi = 3.14159265;
bool c = 0;
long long int n;
pii q[N];
long long int lis() {
  multiset<long long int> x;
  for (long long int i = 1; i <= n + 1 - 1; i++) {
    if (c == 1 and (q[i].first < 0 or q[i].second < 0)) continue;
    auto it = x.upper_bound(q[i].second);
    if (x.end() != it) x.erase(it);
    x.insert(q[i].second);
  }
  long long int ans = 0;
  return x.size();
}
long long int x[N], t[N], v;
void solve() {
  cin >> n;
  bool ok = 0;
  for (long long int i = 1; i <= n; i++) {
    cin >> x[i] >> t[i];
    if (x[i] == 0 and t[i] == 0) ok = 1;
  }
  cin >> v;
  for (long long int i = 1; i <= n; i++) {
    q[i] = {-x[i] + v * t[i], x[i] + v * t[i]};
  }
  sort(q + 1, q + 1 + n);
  long long int ans = lis();
  c = 1;
  cout << lis() << " " << ans;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  solve();
  long long int xx = 0;
  return 0;
}
