#include <bits/stdc++.h>
using namespace std;
const long long INF = 100000000LL * 100000000LL;
const int MAX_N = 100000 + 20;
long long first[MAX_N], t[MAX_N];
pair<long long, long long> f[MAX_N];
long long dp[MAX_N];
int ans[2];
int n, v;
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i(0); i < int(n); i++) cin >> first[i] >> t[i];
  cin >> v;
  for (int i(0); i < int(n); i++)
    f[i] = make_pair(-first[i] + v * t[i], first[i] + v * t[i]);
  sort(f, f + n);
  dp[0] = -INF;
  fill(dp + 1, dp + n + 1, INF);
  for (int i(0); i < int(n); i++) {
    int pos = upper_bound(dp, dp + n + 1, f[i].second) - dp;
    dp[pos] = min(dp[pos], f[i].second);
  }
  for (int i(n); i >= int(0); i--)
    if (dp[i] != INF) ans[1] = max(ans[1], i);
  fill(dp + 1, dp + n + 1, INF);
  for (int i(0); i < int(n); i++)
    if (f[i].first > 0 && f[i].second > 0) {
      int pos = upper_bound(dp, dp + n + 1, f[i].second) - dp;
      dp[pos] = min(dp[pos], f[i].second);
    }
  for (int i(n); i >= int(0); i--)
    if (dp[i] != INF) ans[0] = max(ans[0], i);
  cout << ans[0] << ' ' << ans[1] << endl;
  return 0;
}
