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 oo = 0x3f3f3f3f;
const double eps = 1e-9;
int Start[210000];
int End[210000];
int Midi[210000];
int Ch[210000][2];
int Max1[210000];
int Max2[210000];
int Create(int p, int a, int b) {
  Start[p] = a;
  End[p] = b;
  Max1[p] = -oo;
  Max2[p] = 0;
  int p1 = p + 1;
  if (b - a > 1) {
    Midi[p] = (a + b) / 2;
    Ch[p][0] = p1;
    p1 = Create(p1, a, Midi[p]);
    Ch[p][1] = p1;
    p1 = Create(p1, Midi[p], b);
  }
  return p1;
}
void Add1(int p, int pos, int val) {
  if (pos < Start[p] || pos >= End[p]) {
    return;
  } else if (End[p] - Start[p] > 1) {
    if (pos < Midi[p])
      Add1(Ch[p][0], pos, val);
    else
      Add1(Ch[p][1], pos, val);
  }
  Max1[p] = max(Max1[p], val);
}
void Add2(int p, int pos, int val) {
  if (pos < Start[p] || pos >= End[p]) {
    return;
  } else if (End[p] - Start[p] > 1) {
    if (pos < Midi[p])
      Add2(Ch[p][0], pos, val);
    else
      Add2(Ch[p][1], pos, val);
  }
  Max2[p] = max(Max2[p], val);
}
int Get1(int p, int pos) {
  if (pos >= End[p] - 1) {
    return Max1[p];
  } else if (pos >= Start[p] && End[p] - Start[p] > 1) {
    return max(Get1(Ch[p][0], pos), Get1(Ch[p][1], pos));
  } else
    return -oo;
}
int Get2(int p, int pos) {
  if (pos >= End[p] - 1) {
    return Max2[p];
  } else if (pos >= Start[p] && End[p] - Start[p] > 1) {
    return max(Get2(Ch[p][0], pos), Get2(Ch[p][1], pos));
  } else
    return -oo;
}
int a[110000];
int b[110000];
int main() {
  int n = 0;
  int v = 0;
  scanf("%d", &n);
  set<long long> B;
  vector<pair<long long, long long> > E;
  B.insert(0);
  for (int i = (0); i < (n); i++) {
    scanf("%d%d", &a[i], &b[i]);
  }
  scanf("%d", &v);
  for (int i = (0); i < (n); i++) {
    E.push_back(
        make_pair(-(a[i] - b[i] * (long long)v), a[i] + b[i] * (long long)v));
    B.insert(a[i] + b[i] * (long long)v);
  }
  Create(0, 0, n + 5);
  map<long long, int> M;
  int Nu = 0;
  for (__typeof__((B).begin()) i = (B).begin(); i != (B).end(); i++) {
    M[*i] = Nu;
    Nu++;
  }
  sort((E).begin(), (E).end());
  bool S = false;
  int O1 = 0;
  int O2 = 0;
  for (int i = (0); i < (n); i++) {
    if (S == false && E[i].first >= 0) {
      S = true;
      Add1(0, M[0], 0);
    }
    int Ma = Get1(0, M[E[i].second]) + 1;
    O1 = max(O1, Ma);
    Add1(0, M[E[i].second], Ma);
    Ma = Get2(0, M[E[i].second]) + 1;
    O2 = max(O2, Ma);
    Add2(0, M[E[i].second], Ma);
  }
  printf("%d %d\n", O1, O2);
  return 0;
}
