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 x, t, whe, s, s2;
} a[100100];
int n, t_cnt, V, ans, ans2, Mint = (1 << 30);
int f[100100], f2[100100], Max[100100 * 4], Max2[100100 * 4];
bool cmp(Node x, Node y) {
  return x.s > y.s || (x.s2 == y.s2 && x.t < y.t);
  ;
}
bool cmp2(Node x, Node y) { return x.s2 < y.s2 || (x.s2 == y.s2 && x.t < y.t); }
int Maxans1, Maxans2;
void find(int node, int l, int r, int ll, int rr) {
  if (l > rr || ll > r) return;
  if (ll <= l && rr >= r) {
    Maxans1 = max(Max[node], Maxans1);
    Maxans2 = max(Max2[node], Maxans2);
    return;
  }
  int mid = (l + r) >> 1, son = node << 1;
  find(son, l, mid, ll, rr);
  find(son | 1, mid + 1, r, ll, rr);
}
void push(int node, int l, int r, int hig, int whe) {
  if (l == r) {
    Max[node] = max(f[whe], Max[node]);
    Max2[node] = max(f2[whe], Max2[node]);
    return;
  }
  int mid = (l + r) >> 1, son = node << 1;
  if (hig > mid)
    push(son | 1, mid + 1, r, hig, whe);
  else
    push(son, l, mid, hig, whe);
  Max[node] = max(Max[son], Max[son | 1]);
  Max2[node] = max(Max2[son], Max2[son | 1]);
}
void work() {
  for (int i = 1; i <= n; i++) {
    Maxans1 = 0;
    Maxans2 = 0;
    find(1, 1, t_cnt, 1, a[i].s2);
    if (!Maxans1) {
      if (a[i].t * V >= abs(a[i].x)) f[i] = 1;
    } else
      f[i] = Maxans1 + 1;
    f2[i] = Maxans2 + 1;
    push(1, 1, t_cnt, a[i].s2, i);
    ans = max(f[i], ans);
    ans2 = max(f2[i], ans2);
  }
  printf("%d %d", ans, ans2);
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++)
    scanf("%d %d", &a[i].x, &a[i].t), Mint = min(a[i].t, Mint);
  cin >> V;
  for (int i = 1; i <= n; i++) {
    a[i].s = a[i].x - a[i].t * V;
    a[i].s2 = a[i].x + a[i].t * V;
  }
  sort(a + 1, a + n + 1, cmp2);
  for (int i = 1; i <= n; i++) {
    if (a[i].s2 != a[i - 1].s2) t_cnt++;
    a[i].s2 = t_cnt;
  }
  sort(a + 1, a + n + 1, cmp);
  work();
}
