#include <bits/stdc++.h>
using std::sort;
const int fin = 0, maxn = 100010;
int n;
struct rec {
  int x, y;
} a[maxn];
int f[maxn];
inline bool cmp(const rec &a, const rec &b) {
  return (a.x == b.x) ? (a.y > b.y) : (a.x > b.x);
}
int main() {
  if (fin) {
    freopen("t.in", "r", stdin);
    freopen("t.out", "w", stdout);
  }
  int ans, tans, i, x, y, l, r, m, V, w;
  scanf("%d", &n);
  for (i = 1; i <= n; ++i) scanf("%d%d", &a[i].x, &a[i].y);
  scanf("%d", &V);
  for (i = 1; i <= n; ++i) {
    x = a[i].x, y = a[i].y;
    a[i].x = V * y + x, a[i].y = V * y - x;
  }
  sort(a + 1, a + n + 1, cmp);
  ans = 0;
  for (i = 1; i <= n; ++i) {
    w = a[i].y;
    for (l = 1, r = ans; l <= r;)
      if (m = l + r >> 1, f[m] >= w)
        l = m + 1;
      else
        r = m - 1;
    f[l] = w;
    if (l > ans) ans = l;
  }
  tans = ans, ans = 0;
  a[n + 1].x = a[n + 1].y = 0;
  sort(a + 1, a + n + 2, cmp);
  for (i = 1; i <= n + 1; ++i) {
    w = a[i].y;
    for (l = 1, r = ans; l <= r;)
      if (m = l + r >> 1, f[m] >= w)
        l = m + 1;
      else
        r = m - 1;
    f[l] = w;
    if (l > ans) ans = l;
    if (a[i].x == 0 && a[i].y == 0) break;
  }
  printf("%d %d", l - 1, tans);
  return 0;
}
