#include <bits/stdc++.h>
using namespace std;
int n;
long long V;
pair<int, int> a[110000];
pair<long long, long long> b[110000];
int c[110000];
int solve(int Opt) {
  for (int i = (1); i <= (n); i++)
    b[i] =
        make_pair(V * a[i].second - a[i].first, V * a[i].second + a[i].first);
  sort(b + 1, b + n + 1);
  int len = 0;
  for (int i = (1); i <= (n); i++) {
    int l = 0, r = len;
    while (l < r) {
      int mid = (l + r) / 2 + 1;
      if (c[mid] <= b[i].second)
        l = mid;
      else
        r = mid - 1;
    }
    if (l == 0) {
      if (Opt == 1 && b[i] == make_pair(0LL, 0LL) || Opt == 2) {
        c[l + 1] = b[i].second;
        if (l == len) len++;
      }
    } else {
      c[l + 1] = b[i].second;
      if (l == len) len++;
    }
  }
  return len;
}
int main() {
  cin >> n;
  for (int i = (1); i <= (n); i++) scanf("%d%d", &a[i].first, &a[i].second);
  cin >> V;
  a[++n] = make_pair(0, 0);
  cout << solve(1) - 1 << " ";
  --n;
  cout << solve(2) << endl;
  return 0;
}
