#include <bits/stdc++.h>
using namespace std;
struct node {
  long long x, t;
  int operator<(const node &o) const { return t < o.t || t == o.t && x < o.x; }
};
const int maxn = 101010;
set<long long> s;
map<long long, int> M;
node a[maxn], b[maxn];
long long v;
long long A[maxn], B[maxn];
int c[maxn], opt[maxn], n, tmp;
int T, m;
void ins(int x, int v) {
  for (int i = x; i <= T; i += ((i) & (-i))) c[i] = max(c[i], v);
}
int find(int x) {
  int ans = 0;
  for (int i = x; i; i -= ((i) & (-i))) ans = max(ans, c[i]);
  return ans;
}
void work() {
  s.clear();
  M.clear();
  for (int i = 1; i <= m; i++) b[i].x = B[i], b[i].t = A[i];
  for (int i = 1; i <= m; i++) s.insert(b[i].x);
  sort(b + 1, b + 1 + m);
  T = 0;
  for (set<long long>::iterator i = s.begin(); i != s.end(); i++) M[*i] = ++T;
  memset(c, 0, sizeof(c));
  int ans = 0;
  for (int i = 1; i <= m; i++) {
    opt[i] = find(M[b[i].x]) + 1;
    ins(M[b[i].x], opt[i]);
    ans = max(ans, opt[i]);
  }
  cout << ans;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &tmp);
    a[i].x = tmp;
    scanf("%d", &tmp);
    a[i].t = tmp;
  }
  scanf("%d", &tmp);
  v = tmp;
  m = 0;
  for (int i = 1; i <= n; i++)
    if (a[i].t * v - a[i].x >= 0 && a[i].t * v + a[i].x >= 0)
      A[++m] = a[i].t * v - a[i].x, B[m] = a[i].t * v + a[i].x;
  work();
  cout << " ";
  m = 0;
  for (int i = 1; i <= n; i++)
    A[++m] = a[i].t * v - a[i].x, B[m] = a[i].t * v + a[i].x;
  work();
  cout << endl;
  return 0;
}
