#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100100;
const int INF = 1e9;
int n, v;
long long x[MAXN], t[MAXN];
pair<long long, long long> ar[MAXN];
int bit[MAXN], ans;
map<long long, int> mpx, mpy;
int cntx, cnty;
int query(int i) {
  int ret = -INF;
  for (i++; i > 0; i -= i & -i) ret = max(ret, bit[i]);
  return ret;
}
void update(int i, int v) {
  for (i++; i < MAXN; i += i & -i) bit[i] = max(bit[i], v);
}
void go1() {
  for (int i = 0; i < MAXN; i++) bit[i] = -INF;
  update(mpy[0], 0);
  for (int i = 0; i < n; i++) {
    if (ar[i].first < mpx[0]) continue;
    int res = query(ar[i].second) + 1;
    update(ar[i].second, res);
    ans = max(ans, res);
  }
  cout << ans << ' ';
}
void go2() {
  ans = 0;
  for (int i = 0; i < MAXN; i++) bit[i] = 0;
  for (int i = 0; i < n; i++) {
    int res = query(ar[i].second) + 1;
    update(ar[i].second, res);
    ans = max(ans, res);
  }
  cout << ans << '\n';
}
int main() {
  ios ::sync_with_stdio(0);
  if (fopen("input.txt", "r")) freopen("input.txt", "r", stdin);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> x[i] >> t[i];
  cin >> v;
  for (int i = 0; i < n; i++) {
    t[i] *= v;
    ar[i] = pair<long long, long long>(x[i] + t[i], -x[i] + t[i]);
    mpx[ar[i].first] = 0;
    mpy[ar[i].second] = 0;
  }
  mpx[0] = 0, mpy[0] = 0;
  sort(ar, ar + n);
  for (typeof(mpx.begin()) it = mpx.begin(); it != mpx.end(); it++)
    mpx[it->first] = cntx++;
  for (typeof(mpy.begin()) it = mpy.begin(); it != mpy.end(); it++)
    mpy[it->first] = cnty++;
  for (int i = 0; i < n; i++)
    ar[i].first = mpx[ar[i].first], ar[i].second = mpy[ar[i].second];
  go1();
  go2();
  return 0;
}
