#include <bits/stdc++.h>
using namespace std;
struct node {
  int a, b;
} A[(int)(1e5 + 5)];
int q[(int)(1e5 + 5)], x[(int)(1e5 + 5)], t[(int)(1e5 + 5)], n, V;
bool cmp(node x, node y) { return x.a == y.a ? x.b < y.b : x.a < y.a; }
int fd(int l, int r, int x) {
  int ret = 0;
  while (l <= r) {
    int mid = (l + r) >> 1;
    if (q[mid] > x)
      ret = mid, r = mid - 1;
    else
      l = mid + 1;
  }
  return ret;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> x[i] >> t[i];
  cin >> V;
  for (int i = 1; i <= n; i++) {
    A[i].a = x[i] + t[i] * V;
    A[i].b = -x[i] + t[i] * V;
  }
  sort(A + 1, A + 1 + n, cmp);
  int r = 0;
  q[0] = -0x7ffffff;
  for (int i = 1; i <= n; i++) {
    if (A[i].b >= q[r])
      q[++r] = A[i].b;
    else {
      int p = fd(1, r, A[i].b);
      q[p] = A[i].b;
    }
  }
  int ans1, ans2 = r;
  r = 0;
  q[0] = -0x7fffffff;
  for (int i = 1; i <= n; i++) {
    if (A[i].b >= 0 && A[i].a >= 0) {
      if (A[i].b >= q[r])
        q[++r] = A[i].b;
      else {
        int p = fd(1, r, A[i].b);
        q[p] = A[i].b;
      }
    }
  }
  ans1 = r;
  cout << ans1 << " " << ans2;
  return 0;
}
