#include <bits/stdc++.h>
using namespace std;
const long long maxN = 1000 * 1000 + 100;
long long n, v, x[maxN], t[maxN], a, maxa, y, dp[maxN], maxb, z;
pair<long long, long long> p[maxN];
void bsearch(long long s, long long e) {
  if (s >= e) {
    a = s;
    return;
  } else {
    long long mid = (s + e) / 2;
    if (dp[mid] > y && dp[mid - 1] <= y) {
      a = mid;
      return;
    }
    if (y < dp[mid]) {
      e = mid - 1;
      bsearch(s, e);
    } else {
      s = mid + 1;
      bsearch(s, e);
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> x[i] >> t[i];
  cin >> v;
  for (int i = 1; i <= n; i++) {
    p[i].first = x[i] + (v * t[i]);
    p[i].second = (v * t[i]) - x[i];
  }
  for (int i = 0; i <= n + 100; i++)
    dp[i] = (long long)maxN * (long long)100000000000;
  dp[0] *= -1;
  sort(p + 1, p + n + 1);
  for (int i = 1; i <= n; i++) {
    y = p[i].second;
    bsearch(0, i + 2);
    dp[a] = y;
    maxa = max(maxa, a);
  }
  for (int i = 0; i <= n + 100; i++) {
    dp[i] = (long long)maxN * (long long)100000000000;
    p[i].first = 0;
    p[i].second = 0;
  }
  dp[0] *= -1;
  for (int i = 1; i <= n; i++)
    if ((x[i] + (v * t[i])) >= 0 && ((v * t[i]) - x[i]) >= 0) {
      z++;
      p[z].first = x[i] + (v * t[i]);
      p[z].second = (v * t[i]) - x[i];
    }
  sort(p + 1, p + z + 1);
  a = 0, y = 0;
  for (int i = 1; i <= z; i++) {
    y = p[i].second;
    bsearch(0, i + 1);
    dp[a] = y;
    maxb = max(maxb, a);
  }
  cout << maxb << "  " << maxa << endl;
  return 0;
}
