#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, t, u, v;
  vector<long long> b;
  vector<pair<long long, long long> > a;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%d%d", &x, &t);
    a.push_back(make_pair(x, t));
  }
  scanf("%d", &v);
  a.push_back(make_pair(0, 0));
  for (int i = 0; i < a.size(); ++i)
    a[i] = make_pair(a[i].first + v * a[i].second,
                     -(a[i].first - v * a[i].second));
  sort(a.rbegin(), a.rend());
  u = v = 0;
  for (int i = 0; i < a.size(); ++i) {
    x = -a[i].second;
    t = upper_bound(b.begin(), b.end(), x) - b.begin();
    if (t == b.size())
      b.push_back(x);
    else
      b[t] = x;
    if (a[i] == make_pair(0ll, 0ll))
      u = max(u, t);
    else
      v = max(v, t + 1);
  }
  printf("%d %d\n", u, v);
  return 0;
}
