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 = 1000 * 100 + 2;
const int max_x = 1000 * 1000 * 100 + 3;
const int min_x = -max_x;
pair<int, int> ary[N];
int dp[N];
int n, v;
struct node {
  int val, f, l;
  node *left, *right;
  node() {
    f = l = val = -1;
    left = right = NULL;
  }
  node *lft() {
    if (left != NULL) return left;
    left = new node();
    left->f = f;
    left->l = (f + l) / 2;
    return left;
  }
  node *rgt() {
    if (right != NULL) return right;
    right = new node();
    right->f = (f + l) / 2;
    right->l = l;
    return right;
  }
  void update() {
    if (l - f > 1) val = max(lft()->val, rgt()->val);
  }
};
struct segment {
  node *root;
  segment(int f = min_x, int l = max_x) {
    root = new node();
    root->f = f;
    root->l = l;
  }
  void upd(node *cur, int ind, int x) {
    if (cur->l - cur->f == 1) {
      cur->val = max(cur->val, x);
      return;
    }
    int mid = ((cur->l) + (cur->f)) / 2;
    if (ind < mid)
      upd(cur->lft(), ind, x);
    else
      upd(cur->rgt(), ind, x);
    cur->update();
  }
  void update(int ind, int x) { upd(root, ind, x); }
  int get(node *cur, int st, int en) {
    if (cur->l == en && cur->f == st) {
      return cur->val;
    }
    int mid = (cur->f + cur->l) / 2;
    if (en <= mid) return get(cur->lft(), st, en);
    if (st >= mid) return get(cur->rgt(), st, en);
    return max(get(cur->lft(), st, mid), get(cur->rgt(), mid, en));
  }
  int maxi(int st, int en) { return get(root, st, en); }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  segment *seg = new segment();
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> ary[i].second >> ary[i].first;
  }
  cin >> v;
  sort(ary, ary + n);
  seg->update(0, 0);
  int st = 0;
  for (int i = 0; i < n; i++) {
    int tmp = ary[i].first - st;
    st = ary[i].first;
    int p = seg->maxi(ary[i].second - tmp * v, ary[i].second + tmp * v);
    dp[i] = max(dp[i], p + 1);
    seg->update(ary[i].second, dp[i]);
  }
  int ans1 = 0;
  for (int i = 0; i < n; i++) {
    ans1 = max(ans1, dp[i]);
  }
  segment *sg = new segment();
  sg->update(0, 1);
  for (int i = 0; i < n; i++) {
    sg->update(ary[i].second, 1);
  }
  st = 0;
  for (int i = 0; i < n; i++) {
    int tmp = ary[i].first - st;
    st = ary[i].first;
    int p = sg->maxi(ary[i].second - tmp * v, ary[i].second + tmp * v);
    dp[i] = max(dp[i], p + 1);
    sg->update(ary[i].second, dp[i]);
  }
  int ans2 = 0;
  for (int i = 0; i < n; i++) {
    ans2 = max(ans2, dp[i]);
  }
  cout << ans1 << " " << ans2 << endl;
  return 0;
}
