12
-6712 6
2375 73
4643 197
-5660 215
-378 223
2228 307
3305 340
3449 468
-4389 707
-7161 729
-1838 921
-1655 985
730
 5
1 5
6 7
17127 17
17072 42
17042 77
3
 7
-976754 20479
79929143 911181
9598220 82517
-51609349 810257
67416551 266544
-14170975 307690
-15476178 491195
352
 22
-5301 602
-1400 194
-8512 987
-282 962
6484 494
9091 523
-7744 92
6002 461
5053 305
-1339 272
-821 165
9308 785
929 421
8384 883
1266 157
8411 923
-2949 885
7725 687
6859 197
-7630 867
5031 918
5662 410
41

11 12
 2 3
 5 5
 9 9

#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;
}
