#include <bits/stdc++.h>
using namespace std;
const int maxn = 100010;
int n, v, q[maxn];
pair<int, int> z[maxn];
int main() {
  scanf("%d", &n);
  for (int a = 1; a <= n; a++) {
    int x, t;
    scanf("%d%d", &x, &t);
    z[a] = make_pair(x, t);
  }
  scanf("%d", &v);
  for (int a = 1; a <= n; a++)
    z[a] =
        make_pair(-z[a].first - z[a].second * v, z[a].first - z[a].second * v);
  z[n + 1] = make_pair(0, 0);
  sort(z + 1, z + n + 2);
  int ans1 = 0, ans2 = 0, cnt = 0;
  q[0] = -0x3f3f3f3f;
  for (int a = 1; a <= n + 1; a++) {
    int nowl = z[a].second;
    int l = 0, r = cnt;
    while (l + 1 < r) {
      int m = (l + r) >> 1;
      if (q[m] <= nowl)
        l = m;
      else
        r = m;
    }
    if (nowl >= q[r]) {
      cnt++;
      q[cnt] = nowl;
      r++;
    } else
      q[r] = nowl;
    if (z[a] == make_pair(0, 0))
      ans1 = max(ans1, r - 1);
    else
      ans2 = max(ans2, r);
  }
  printf("%d %d\n", ans1, ans2);
  return 0;
}
