#include <bits/stdc++.h>
int n, v;
struct Node {
  int t, x;
  long long p, q;
  bool operator<(const Node& a) const {
    if (p == a.p) return q < a.q;
    return p < a.p;
  }
} node[105000];
using namespace std;
int dp[105000];
long long length[105000];
int root;
void DP() {
  sort(node + 1, node + 1 + n);
  root = 1;
  for (int i = n; i > 0; i--) {
    int left = 0;
    length[0] = 90000000000;
    int right = root - 1;
    while (left <= right) {
      int mid = (left + right) >> 1;
      if (length[mid] >= node[i].q)
        left = mid + 1;
      else
        right = mid - 1;
    }
    dp[i] = left;
    if (left == root) root++;
    length[left] = node[i].q;
  }
  int p = 0;
  int q = 0;
  int sum = 0;
  for (int i = 1; i < n + 1; i++) {
    if (p <= node[i].p && q <= node[i].q) {
      sum = (dp[i] > sum ? dp[i] : sum);
    }
  }
  cout << sum << ' ' << root - 1 << endl;
}
int main() {
  while (cin >> n) {
    for (int i = 1; i < n + 1; i++) scanf("%d%d", &node[i].x, &node[i].t);
    cin >> v;
    for (int i = 1; i < n + 1; i++) {
      node[i].p = node[i].t * v + node[i].x;
      node[i].q = node[i].p - 2 * node[i].x;
    }
    DP();
  }
  return 0;
}
