#include <bits/stdc++.h>
using namespace std;
const int mm = 111111;
struct data {
  long long p, q;
} g[mm];
long long q[mm], x[mm], t[mm], v;
int i, j, n, r, ans;
bool cmp(data a, data b) { return a.p < b.p || (a.p == b.p && a.q < b.q); }
int find(int l, int r, long long x) {
  int m, ret = 0;
  while (l <= r) {
    m = (l + r) >> 1;
    if (q[m] > x)
      ret = m, r = m - 1;
    else
      l = m + 1;
  }
  return ret;
}
int main() {
  while (~scanf("%d", &n)) {
    for (i = 0; i < n; ++i) scanf("%I64d%I64d", &x[i], &t[i]);
    scanf("%I64d", &v);
    for (i = 0; i < n; ++i) {
      g[i].p = -x[i] + t[i] * v;
      g[i].q = x[i] + t[i] * v;
    }
    sort(g, g + n, cmp);
    q[0] = -1e12, q[r = 1] = 1e12;
    for (i = 0; i < n; ++i) {
      j = find(0, r, g[i].q);
      if (q[j] > g[i].q) q[j] = g[i].q;
      if (j >= r) q[++r] = 1e12;
    }
    ans = r - 1;
    q[r = 1] = 1e10;
    for (i = 0; i < n; ++i)
      if (g[i].p >= 0 && g[i].q >= 0) {
        j = find(0, r, g[i].q);
        if (q[j] > g[i].q) q[j] = g[i].q;
        if (j >= r) q[++r] = 1e12;
      }
    printf("%d %d\n", r - 1, ans);
  }
  return 0;
}
