#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n;
long long v;
vector<pair<long long, long long> > A, ret;
int main() {
  scanf("%d", &n);
  for (int i = 0, a, b; i < n; ++i)
    scanf("%d %d", &a, &b), ret.emplace_back(a, b);
  scanf("%lld", &v);
  for (auto &first : ret)
    A.emplace_back(first.second * v + first.first,
                   first.second * v - first.first);
  sort(A.begin(), A.end());
  vector<long long> V;
  for (auto &first : A) {
    auto it = upper_bound(V.begin(), V.end(), first.second);
    if (it == V.end())
      V.emplace_back(first.second);
    else
      *it = first.second;
  }
  int ans = V.size();
  V.clear();
  for (auto &first : A)
    if (first.first >= 0 and first.second >= 0) {
      auto it = upper_bound(V.begin(), V.end(), first.second);
      if (it == V.end())
        V.emplace_back(first.second);
      else
        *it = first.second;
    }
  printf("%d %d\n", (int)V.size(), ans);
}
