#include <bits/stdc++.h>
using namespace std;
struct node {
  long long x, y;
  int id;
};
node p[100010], tp[100010];
long long s[100010], pre[100010];
int dp[100010], id[100010];
bool cmp(const node &x, const node &y) {
  if (x.x != y.x) return x.x < y.x;
  return x.y < y.y;
}
int gao(node *p, int n) {
  s[0] = -200000000000LL;
  id[0] = -1;
  int top = 0;
  for (int i = 0; i < n; i++) p[i].id = i + 1;
  for (int i = 0; i < n; i++) {
    if (p[i].y >= s[top]) {
      s[++top] = p[i].y;
      id[top] = i;
      dp[i] = top;
      pre[i] = id[top - 1];
    } else {
      int left = 0, right = top;
      while (left + 1 < right) {
        int mid = (left + right) / 2;
        if (s[mid] <= p[i].y)
          left = mid;
        else
          right = mid;
      }
      s[left + 1] = p[i].y;
      id[left + 1] = i;
      dp[i] = left + 1;
      pre[i] = id[left];
    }
  }
  int max = 0;
  for (int i = 0; i < n; i++)
    if (dp[i] > dp[max]) max = i;
  return dp[max];
}
int main() {
  int n;
  while (scanf("%d", &n) == 1) {
    for (int i = 0; i < n; i++) scanf("%I64d%I64d", &p[i].x, &p[i].y);
    long long v;
    scanf("%I64d", &v);
    for (int i = 0; i < n; i++) {
      long long x, t;
      x = p[i].x;
      t = p[i].y;
      p[i].x = v * t - x;
      p[i].y = v * t + x;
    }
    sort(p, p + n, cmp);
    int ans2 = gao(p, n);
    bool find = false;
    if (!find) {
      p[n].x = 0;
      p[n].y = 0;
      n++;
    }
    sort(p, p + n, cmp);
    int cnt = 0;
    for (int i = 0; i < n; i++) {
      if (p[i].x >= 0 && p[i].y >= 0) tp[cnt++] = p[i];
    }
    int ans1 = gao(tp, cnt);
    printf("%d %d\n", ans1 - 1, ans2);
  }
  return 0;
}
