#include <bits/stdc++.h>
using namespace std;
int n;
struct point {
  int x, t, p, q;
};
bool operator>(point a, point b) {
  return (a.p > b.p) or (a.p == b.p and a.q > b.q);
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n;
  point arr[n + 1];
  for (int i = 0; i < n; i++) cin >> arr[i].x >> arr[i].t;
  int v;
  cin >> v;
  for (int i = 0; i < n; i++)
    arr[i].p = arr[i].x + arr[i].t * v, arr[i].q = -arr[i].x + arr[i].t * v;
  arr[n].p = arr[n].q = arr[n].x = arr[n].t = 0;
  sort(arr, arr + n + 1, greater<point>());
  int d[n + 1];
  for (int i = 0; i <= n; i++) d[i] = (int)1e9;
  int cur_len = 1;
  for (int i = 0; i <= n; i++) {
    int ind = upper_bound(d, d + cur_len, -arr[i].q) - d;
    if (arr[i].t == 0 and arr[i].x == 0)
      cout << ind << " ";
    else {
      d[ind] = -arr[i].q;
      cur_len = max(ind + 1, cur_len);
    }
  }
  cout << cur_len << "\n";
}
