#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int x[N], t[N], s[N];
struct data {
  int a, b;
} w[N];
bool compare(data a, data b) {
  return (a.a < b.a || (a.a == b.a && a.b < b.b));
}
int main() {
  int n, v, i, l, r, mid, ans;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d %d", &x[i], &t[i]);
  scanf("%d", &v);
  for (i = 1; i <= n; i++) {
    w[i].a = t[i] * v + x[i];
    w[i].b = t[i] * v - x[i];
  }
  sort(w + 1, w + n + 1, compare);
  s[0] = 0;
  for (i = 1; i <= n; i++)
    if (s[0] == 0) {
      s[0]++;
      s[s[0]] = w[i].b;
    } else if (s[s[0]] <= w[i].b) {
      s[0]++;
      s[s[0]] = w[i].b;
    } else if (s[1] > w[i].b)
      s[1] = w[i].b;
    else {
      l = 1;
      r = s[0];
      while (l + 1 < r) {
        mid = (l + r) / 2;
        if (s[mid] > w[i].b)
          r = mid;
        else
          l = mid;
      }
      s[r] = w[i].b;
    }
  ans = s[0];
  s[0] = 0;
  for (i = 1; i <= n; i++)
    if (w[i].a >= 0 && w[i].b >= 0)
      if (s[0] == 0) {
        s[0]++;
        s[s[0]] = w[i].b;
      } else if (s[s[0]] <= w[i].b) {
        s[0]++;
        s[s[0]] = w[i].b;
      } else if (s[1] > w[i].b)
        s[1] = w[i].b;
      else {
        l = 1;
        r = s[0];
        while (l + 1 < r) {
          mid = (l + r) / 2;
          if (s[mid] > w[i].b)
            r = mid;
          else
            l = mid;
        }
        s[r] = w[i].b;
      }
  printf("%d %d", s[0], ans);
  return (0);
}
