#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;
}
