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 = 100100;
int n, V, m = 1;
int a[N], tr[N];
pair<int, int> e[N];
void init() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i)
    scanf("%d%d", &e[i].first, &e[i].second), e[i].second = -e[i].second;
  scanf("%d", &V);
  for (int i = 1; i <= n; ++i)
    e[i].first += V * e[i].second,
        e[i].second = (long long)V * e[i].second * 2 - e[i].first;
  e[++n] = make_pair(0, 0);
  sort(e + 1, e + 1 + n);
}
int find(const int x) {
  if (a[1] == x) return 1;
  if (a[m] == x) return m;
  int L = 1, R = m, mid;
  while (L + 1 < R) {
    mid = (L + R) >> 1;
    if (a[mid] == x) return mid;
    if (a[mid] < x)
      L = mid;
    else
      R = mid;
  }
  return 0;
}
int ask(const int x) {
  int p = 0;
  for (int i = x; i > 0; i -= i & -i)
    if (tr[i] > p) p = tr[i];
  ++p;
  for (int i = x; i <= m && tr[i] < p; i += i & -i) tr[i] = p;
  return p;
}
void work() {
  for (int i = 1; i <= n; ++i) a[i] = e[i].second;
  sort(a + 1, a + 1 + n);
  for (int i = 2; i <= n; ++i)
    if (a[i] != a[m]) a[++m] = a[i];
  memset(tr, 0, sizeof(tr));
  int ans = 0, A = 0;
  for (int i = 1, x, y; i <= n; ++i) {
    x = find(e[i].second);
    y = ask(x);
    if (y > ans) ans = y;
    if (e[i].second == 0 && e[i].first == 0) A = y - 1;
  }
  printf("%d %d\n", A, ans);
}
int main() {
  init();
  work();
  return 0;
}
