#include <bits/stdc++.h>
using namespace std;
struct S {
  long long x, y, a, t;
} s[100005];
int n, len, len1;
long long dp[100005];
bool cmp(S j, S k) {
  if (j.x == k.x) return j.y < k.y;
  return j.x < k.x;
}
int solve(int i) {
  dp[0] = s[i].y;
  len = 1;
  i++;
  for (; i < n; ++i) {
    if (s[i].y >= dp[len - 1]) {
      dp[len++] = s[i].y;
    } else {
      int k = upper_bound(dp, dp + len, s[i].y) - dp;
      if (k == 0 && dp[k] == 0) continue;
      dp[k] = s[i].y;
    }
  }
  return len;
}
int main() {
  int i, ans1, ans2;
  while (~scanf("%d", &n)) {
    int v;
    for (i = 0; i < n; ++i) {
      scanf("%lld %lld", &s[i].a, &s[i].t);
    }
    scanf("%d", &v);
    for (i = 0; i < n; ++i) {
      s[i].x = -s[i].a + s[i].t * v;
      s[i].y = s[i].a + s[i].t * v;
    }
    sort(s, s + n, cmp);
    ans1 = solve(0);
    s[n].x = 0;
    s[n].y = 0;
    n++;
    sort(s, s + n, cmp);
    for (i = 0; i < n; ++i) {
      if (s[i].x == 0 && s[i].y == 0) break;
    }
    ans2 = solve(i) - 1;
    printf("%d %d\n", ans2, ans1);
  }
  return 0;
}
