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;
struct node {
  int val, pos;
  bool lr;
  node() {}
  node(int a, int b, bool c) : val(a), pos(b), lr(c) {}
  bool operator<(const node &a) const { return val < a.val; }
} ALL[100000 * 2 + 10];
struct line {
  int l, r;
  bool operator<(const line &a) const {
    if (r != a.r)
      return r < a.r;
    else
      return l < a.l;
  }
} A[100000 + 10];
int x[100000 + 10], t[100000 + 10];
int L[100000 + 10], R[100000 + 10];
int N, V;
int dp[100000 + 10];
int c[100000 * 2 + 10];
int Cnt;
int lowbit(int x) { return x & -x; }
void add(int x, int val, int *c) {
  while (x <= Cnt) {
    c[x] = max(c[x], val);
    x += lowbit(x);
  }
}
int GetMax(int x, int *c) {
  int rn = 0;
  while (x > 0) {
    rn = max(rn, c[x]);
    x -= lowbit(x);
  }
  return rn;
}
int main() {
  scanf("%d", &N);
  int i, j;
  for (i = 1; i <= N; ++i) scanf("%d%d", &x[i], &t[i]);
  scanf("%d", &V);
  for (i = 1; i <= N; ++i) {
    L[i] = -x[i] + t[i] * V;
    R[i] = x[i] + t[i] * V;
    ALL[i * 2 - 1] = node(L[i], i, 0);
    ALL[i * 2] = node(R[i], i, 1);
  }
  sort(ALL + 1, ALL + N * 2 + 1);
  Cnt = 0;
  for (i = 1; i <= N * 2; ++i) {
    if (i == 1 || ALL[i].val != ALL[i - 1].val) ++Cnt;
    if (!ALL[i].lr)
      A[ALL[i].pos].l = Cnt;
    else
      A[ALL[i].pos].r = Cnt;
  }
  sort(A + 1, A + N + 1);
  memset(dp, 0, sizeof(dp));
  memset(c, 0, sizeof(c));
  int ans1 = 1, ans2 = 1;
  for (i = 1; i <= N; ++i)
    if (L[i] >= 0 && R[i] >= 0) {
      int val = GetMax(A[i].l, c) + 1;
      dp[i] = val;
      add(A[i].l, dp[i], c);
      ans1 = max(ans1, dp[i]);
    }
  memset(dp, 0, sizeof(dp));
  memset(c, 0, sizeof(c));
  for (i = 1; i <= N; ++i) {
    int val = GetMax(A[i].l, c) + 1;
    dp[i] = val;
    add(A[i].l, dp[i], c);
    ans2 = max(ans2, dp[i]);
  }
  printf("%d %d\n", ans1, ans2);
}
