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 Tpt {
  long long p, q;
};
bool ByPQ(const Tpt& a, const Tpt& b) {
  return a.p < b.p || (a.p == b.p && a.q < b.q);
}
const int MAX_PN = 100010;
Tpt P[MAX_PN];
int Pn, Dn, V;
int X[MAX_PN], T[MAX_PN];
long long D[MAX_PN];
const int MAX_ARR = MAX_PN << 2;
int Tmax[MAX_ARR];
int Ql, Qr, Qw, Qp, Ans;
void QueryUtil(int p = 1, int l = 1, int r = Dn) {
  if ((r < Ql || Qr < l)) return;
  if ((Ql <= l && r <= Qr)) {
    ((Ans) < (Tmax[p]) ? (Ans) = (Tmax[p]) : 1);
    return;
  }
  QueryUtil((p << 1), l, ((l + r) >> 1)),
      QueryUtil((p << 1 | 1), ((l + r) >> 1) + 1, r);
}
int Query(int l, int r) {
  Ql = l, Qr = r, Ans = -(INT_MAX >> 1);
  QueryUtil();
  return Ans;
}
void PushUp(int p) {
  Tmax[p] = ((Tmax[(p << 1)]) > (Tmax[(p << 1 | 1)]) ? (Tmax[(p << 1)])
                                                     : (Tmax[(p << 1 | 1)]));
}
void ModifyUtil(int p = 1, int l = 1, int r = Dn) {
  if ((r < Qp || Qp < l)) return;
  if (l == r) {
    Tmax[p] = Qw;
    return;
  }
  ModifyUtil((p << 1), l, ((l + r) >> 1)),
      ModifyUtil((p << 1 | 1), ((l + r) >> 1) + 1, r);
  PushUp(p);
}
void Modify(int p, int w) {
  Qp = p, Qw = w;
  ModifyUtil();
}
int DP() {
  int ret = 0;
  for (int i = 1, f; i <= Pn; i++) {
    int p = (lower_bound(D + 1, D + 1 + Dn, (P[i].q)) - D);
    if (P[i].p == 0 && P[i].q == 0) {
      f = 0;
    } else {
      f = 1 + Query(1, p);
    }
    Modify(p, f);
    ((ret) < (f) ? (ret) = (f) : 1);
  }
  return ret;
}
inline void Main() {
  scanf("%d", &Pn);
  for (int i = 1; i <= Pn; i++) {
    scanf("%d%d", X + i, T + i);
  }
  scanf("%d", &V);
  for (int i = 1; i <= Pn; i++) {
    P[i] = (Tpt){(long long)X[i] + T[i] * V, (long long)-X[i] + T[i] * V};
    D[++Dn] = P[i].q;
  }
  P[++Pn] = (Tpt){0, 0}, D[++Dn] = 0;
  sort(P + 1, P + 1 + Pn, ByPQ);
  sort(D + 1, D + 1 + Dn);
  Dn = unique(D + 1, D + 1 + Dn) - D - 1;
  memset(Tmax, -60, sizeof(Tmax));
  int ans1 = DP();
  memset(Tmax, 0, sizeof(Tmax));
  int ans2 = DP();
  printf("%d %d\n", ans1, ans2);
}
int main() {
  Main();
  return 0;
}
