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>
struct case1 {
  long long x;
  int y;
} r[100001], p[100001];
int tree[100001];
int n;
int que(int i) {
  int s = 0;
  for (; i; i -= ((i) & (-(i)))) s = ((s) > (tree[i]) ? (s) : (tree[i]));
  return s;
}
void ins(int i, int v) {
  for (; i <= n; i += ((i) & (-(i))))
    tree[i] = ((v) > (tree[i]) ? (v) : (tree[i]));
}
void qs(int x, int y) {
  int i = x, j = y;
  struct case1 t = r[(x + y) >> 1];
  if (x >= y) return;
  r[(x + y) >> 1] = r[x];
  while (i < j) {
    while (i < j && r[j].x > t.x) j--;
    if (i < j) r[i++] = r[j];
    while (i < j && r[i].x < t.x) i++;
    if (i < j) r[j--] = r[i];
  }
  r[i] = t;
  qs(x, i - 1);
  qs(i + 1, y);
}
void qs2(int x, int y) {
  int i = x, j = y;
  struct case1 t = p[(x + y) >> 1];
  if (x >= y) return;
  p[(x + y) >> 1] = p[x];
  while (i < j) {
    while (i < j && (p[j].x > t.x || p[j].x == t.x && p[j].y > t.y)) j--;
    if (i < j) p[i++] = p[j];
    while (i < j && (p[i].x < t.x || p[i].x == t.x && p[i].y < t.y)) i++;
    if (i < j) p[j--] = p[i];
  }
  p[i] = t;
  qs2(x, i - 1);
  qs2(i + 1, y);
}
int main() {
  int i, v, t = 0, o = 0, ans = 0;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d%I64d", &p[i].y, &p[i].x);
  scanf("%d", &v);
  for (i = 1; i <= n; i++) {
    r[i] = (struct case1){v * p[i].x + p[i].y, i};
    p[i].x = v * p[i].x - p[i].y;
  }
  qs(1, n);
  for (i = 1; i <= n; i++) {
    if (i == 1 || r[i].x > r[i - 1].x) {
      o++;
      if (r[i].x >= 0 && !t) t = o;
    }
    p[r[i].y].y = o;
  }
  qs2(1, n);
  for (i = 1; i < t; i++) tree[i] = -1000000000;
  for (i = 1; i <= n && p[i].x < 0; i++)
    ;
  for (; i <= n; i++) {
    t = que(p[i].y);
    ans = ((ans) > (t + 1) ? (ans) : (t + 1));
    ins(p[i].y, t + 1);
  }
  printf("%d ", ans);
  ans = 0;
  memset(tree, 0, sizeof(tree));
  for (i = 1; i <= n; i++) {
    t = que(p[i].y);
    ans = ((ans) > (t + 1) ? (ans) : (t + 1));
    ins(p[i].y, t + 1);
  }
  printf("%d\n", ans);
  return 0;
}
