#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
const int inf = 1e9 + 7;
inline void read(int &x) {
  x = 0;
  char ch = getchar();
  while (ch < '0') ch = getchar();
  while (ch >= '0') {
    x = x * 10 + ch - 48;
    ch = getchar();
  }
}
int a[N];
int v;
int t[N];
int f[N];
struct node {
  int val;
  int val2;
  int id;
} srt[N];
inline bool cmp(const node &x, const node &y) {
  if (x.val != y.val)
    return x.val < y.val;
  else
    return x.val2 < y.val2;
}
int pp;
namespace BIT {
int c[N];
inline void init() { memset(c, 0, sizeof(c)); }
inline int lowbit(int x) { return x & (-x); }
inline void modify(int x, int y) {
  while (x <= pp) {
    c[x] = max(c[x], y);
    x += lowbit(x);
  }
}
inline int query(int x) {
  if (!x) return 0;
  int res = 0;
  while (x) {
    res = max(res, c[x]);
    x -= lowbit(x);
  }
  return res;
}
};  // namespace BIT
int rk[N], g[N];
pair<int, int> q[N];
int lis(int n) {
  BIT::init();
  pp = n;
  for (int i = (1); i <= (n); i++) q[i].first = f[i], q[i].second = i;
  sort(q + 1, q + 1 + n);
  int k = 0;
  for (int i = (1); i <= (n); i++) {
    if (i == 1 || q[i].first != q[i - 1].first) ++k;
    rk[q[i].second] = k;
  }
  int ans = 0;
  for (int i = (1); i <= (n); i++) {
    g[i] = BIT::query(rk[i]) + 1;
    BIT::modify(rk[i], g[i]);
    ans = max(ans, g[i]);
  }
  return ans;
}
int main() {
  int n;
  read(n);
  for (int i = (1); i <= (n); i++) scanf("%d%d", &a[i], &t[i]);
  read(v);
  for (int i = (1); i <= (n); i++) f[i] = a[i] + v * t[i];
  int cpt = 0;
  for (int i = (1); i <= (n); i++) {
    srt[i].val = -a[i] + v * t[i];
    srt[i].val2 = f[i];
  }
  int ans1, ans2;
  sort(srt + 1, srt + 1 + n, cmp);
  for (int i = (1); i <= (n); i++) f[i] = srt[i].val2;
  ans2 = lis(n);
  for (int i = (1); i <= (n); i++) {
    if (-a[i] + v * t[i] <= 0 || a[i] + v * t[i] <= 0) continue;
    srt[++cpt].val = -a[i] + v * t[i];
    srt[cpt].val2 = a[i] + v * t[i];
  }
  ++cpt;
  srt[cpt].val = srt[cpt].val2 = 0;
  sort(srt + 1, srt + 1 + cpt, cmp);
  for (int i = (1); i <= (cpt); i++) f[i] = srt[i].val2;
  ans1 = lis(cpt) - 1;
  printf("%d %d\n", ans1, ans2);
  return 0;
}
