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 segment_tree {
  vector<long long> tree;
  vector<long long> pos;
  long long n;
  segment_tree() {
    tree = {};
    pos = {};
    n = 0;
  }
  void build(long long v, long long l, long long r) {
    if (l == r - 1) {
      pos[l] = v;
      return;
    }
    long long m = (l + r) / 2;
    build(v * 2, l, m);
    build(v * 2 + 1, m, r);
  }
  segment_tree(long long sz) {
    tree.assign(sz * 4, 0);
    pos.assign(sz, 0);
    n = sz;
    build(1, 0, n);
  }
  void upd(long long p, long long val) {
    long long v = pos[p];
    tree[v] = val;
    v /= 2;
    while (v) {
      tree[v] = max(tree[v * 2], tree[v * 2 + 1]);
      v /= 2;
    }
  }
  long long get(long long v, long long tl, long long tr, long long l,
                long long r) {
    if (tl >= r || tr <= l) return 0;
    if (tl >= l && tr <= r) return tree[v];
    long long tm = (tl + tr) / 2;
    return max(get(v * 2, tl, tm, l, r), get(v * 2 + 1, tm, tr, l, r));
  }
  long long get(long long l, long long r) { return get(1, 0, n, l, r + 1); }
};
long long n;
vector<pair<long long, long long> > a;
vector<long long> help;
long long v;
void read() {
  cin >> n;
  a.resize(n);
  for (auto &i : a) cin >> i.first >> i.second;
  cin >> v;
}
long long get_ans1(vector<long long> a, long long ind) {
  set<long long> help;
  for (auto i : a) help.insert(i);
  help.insert(0);
  long long cnt = 0;
  map<long long, long long> help2;
  for (auto i : help) help2[i] = cnt++;
  for (long long i = 0; i < a.size(); i++) a[i] = help2[a[i]];
  segment_tree tree(cnt);
  for (long long i = 0; i < a.size(); i++) {
    long long help = tree.get(0, a[i]);
    if (help > 0 || i == ind) tree.upd(a[i], help + 1);
  }
  return tree.tree[1];
}
long long get_ans2(vector<long long> a) {
  set<long long> help;
  for (auto i : a) help.insert(i);
  long long cnt = 0;
  map<long long, long long> help2;
  for (auto i : help) help2[i] = cnt++;
  for (long long i = 0; i < a.size(); i++) a[i] = help2[a[i]];
  segment_tree tree(cnt);
  for (long long i = 0; i < a.size(); i++) {
    long long help = tree.get(0, a[i]);
    tree.upd(a[i], help + 1);
  }
  return tree.tree[1];
}
bool check(pair<long long, long long> a, pair<long long, long long> b) {
  return abs(a.second - b.second) * v >= abs(a.first - b.first);
}
long long ans1, ans2;
void run() {
  bool flag = false;
  for (auto i : a) {
    flag |= (i == make_pair(0LL, 0LL));
  }
  auto b = a;
  if (!flag) a.push_back({0LL, 0LL});
  vector<pair<long long, long long> > c;
  for (auto i : a) {
    if (check(i, {0LL, 0LL})) c.push_back(i);
  }
  a.clear();
  for (long long i = 0; i < c.size(); i++) {
    long long x = c[i].first;
    long long t = c[i].second;
    long long p = -x + t * v;
    long long q = x + t * v;
    a.push_back({p, q});
  }
  sort(a.begin(), a.end());
  long long ind = 0;
  for (long long i = 0; i < a.size(); i++)
    if (a[i] == make_pair(0LL, 0LL)) ind = i;
  vector<long long> help;
  for (auto i : a) help.push_back(i.second);
  ans1 = get_ans1(help, ind);
  if (!flag) ans1--;
  a.clear();
  for (long long i = 0; i < n; i++) {
    long long x = b[i].first;
    long long t = b[i].second;
    long long p = -x + t * v;
    long long q = x + t * v;
    a.push_back({p, q});
  }
  sort(a.begin(), a.end());
  help.clear();
  for (auto i : a) help.push_back(i.second);
  ans2 = get_ans2(help);
}
void write() { cout << ans1 << " " << ans2 << endl; }
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  read();
  run();
  write();
  return 0;
}
