#include <bits/stdc++.h>
using namespace std;
long long n, m, k, l, i, j, a, b, V;
pair<long long, long long> p[100005];
vector<long long> v;
vector<pair<long long, long long> > v1;
int main() {
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> p[i].first >> p[i].second;
  }
  sort(p, p + n);
  cin >> V;
  for (i = 0; i < n; i++) {
    v1.push_back({p[i].first + p[i].second * V, -p[i].first + p[i].second * V});
  }
  sort(v1.begin(), v1.end());
  for (i = 0; i < n; i++) {
    vector<long long>::iterator a =
        upper_bound(v.begin(), v.end(), v1[i].second);
    if (a == v.end())
      v.push_back(v1[i].second);
    else
      *a = v1[i].second;
  }
  long long res = v.size();
  v.clear();
  v1.push_back({0, 0});
  sort(v1.begin(), v1.end());
  for (i = 0; i < n + 1; i++) {
    if (v1[i].second < 0 || v1[i].first < 0) continue;
    vector<long long>::iterator a =
        upper_bound(v.begin(), v.end(), v1[i].second);
    if (a == v.end())
      v.push_back(v1[i].second);
    else
      *a = v1[i].second;
  }
  cout << v.size() - 1 << " " << res;
}
