#include <bits/stdc++.h>
const int MAXN = 210000;
inline int min(const int &a, const int &b) { return a < b ? a : b; }
inline int max(const int &a, const int &b) { return a > b ? a : b; }
int pos[MAXN][2];
int n, v, tot = 0;
struct Seg {
  int l, r;
} lines[MAXN];
inline bool operator<(const Seg &a, const Seg &b) {
  if (a.r == b.r) return a.l > b.l;
  return a.r < b.r;
}
int lis[MAXN], f[MAXN];
int yy[MAXN * 2], sc[MAXN * 2];
inline int lowbit(const int &a) { return a & -a; }
void set(int *c, int p, int v) {
  while (p) {
    c[p] = max(c[p], v);
    p -= lowbit(p);
  }
}
int query(int *c, int p) {
  int ret = 0;
  while (p <= tot) {
    ret = max(ret, c[p]);
    p += lowbit(p);
  }
  return ret;
}
inline bool cmp(const int &a, const int &b) { return sc[a] < sc[b]; }
inline bool cmp2(const int &a, const int &b) { return lines[a] < lines[b]; }
int main() {
  scanf("%d", &n);
  int mxt = 0;
  for (int i = 1; i <= n; i++)
    scanf("%d%d", &pos[i][0], &pos[i][1]), mxt = max(mxt, pos[i][1]);
  scanf("%d", &v);
  for (int i = 1; i <= n; i++) {
    lines[i].l = pos[i][0] - pos[i][1] * v;
    lines[i].r = pos[i][0] + pos[i][1] * v;
    sc[(i << 1) - 1] = lines[i].l;
    sc[i << 1] = lines[i].r;
    yy[(i << 1) - 1] = (i << 1) - 1;
    yy[i << 1] = i << 1;
  }
  n++;
  lines[n].r = 0;
  lines[n].l = 0;
  sc[(n << 1) - 1] = lines[n].l;
  sc[n << 1] = lines[n].r;
  yy[(n << 1) - 1] = (n << 1) - 1;
  yy[n << 1] = n << 1;
  std::sort(yy + 1, yy + ((n << 1) + 1), cmp);
  sc[0] = -17194721;
  for (int i = 1; i <= (n << 1); i++) {
    if (sc[yy[i - 1]] != sc[yy[i]]) tot++;
    if (yy[i] & 1)
      lines[(yy[i] + 1) >> 1].l = tot;
    else
      lines[(yy[i] + 1) >> 1].r = tot;
  }
  for (int i = 1; i <= n; i++) yy[i] = i;
  std::sort(yy + 1, yy + (n + 1), cmp2);
  int ans1 = 0;
  for (int i = 1; i <= n; i++) {
    if (!(lines[yy[i]].l <= lines[n].l && lines[yy[i]].r >= lines[n].r) ||
        yy[i] == n)
      continue;
    f[yy[i]] = query(lis, lines[yy[i]].l) + 1;
    set(lis, lines[yy[i]].l, f[yy[i]]);
    ans1 = max(ans1, f[yy[i]]);
  }
  int ans2 = 0;
  memset(lis, 0, sizeof lis);
  memset(f, 0, sizeof f);
  for (int i = 1; i <= n; i++) {
    if (yy[i] == n) continue;
    f[yy[i]] = query(lis, lines[yy[i]].l) + 1;
    set(lis, lines[yy[i]].l, f[yy[i]]);
    ans2 = max(ans2, f[yy[i]]);
  }
  printf("%d %d\n", ans1, ans2);
}
