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 _ {
  _() { ios_base::sync_with_stdio(0); }
} _;
template <class A, class B>
ostream &operator<<(ostream &o, pair<A, B> t) {
  o << "(" << t.first << ", " << t.second << ")";
  return o;
}
template <class T>
string tostring(T first, int len = 0, char c = '0') {
  stringstream ss;
  ss << first;
  string r = ss.str();
  if (r.length() < len) r = string(len - r.length(), c) + r;
  return r;
}
template <class T>
void PV(T a, T b, int n = 0, int w = 0, string s = " ") {
  int c = 0;
  while (a != b) {
    cout << tostring(*a++, w, ' ');
    if (a != b && (n == 0 || ++c % n))
      cout << s;
    else
      cout << "\n";
    cout.flush();
  }
}
template <class T>
inline bool chmin(T &a, T b) {
  return a > b ? a = b, 1 : 0;
}
template <class T>
inline bool chmax(T &a, T b) {
  return a < b ? a = b, 1 : 0;
}
const long long linf = 0x3f3f3f3f3f3f3f3fLL;
const int inf = 0x3f3f3f3f;
const int mod = int(1e9) + 7;
const int N = 111111;
int n, V;
int first[N];
int t[N];
int LIS(vector<int> d, int pos) {
  if (pos != -1) {
    vector<int> L, R;
    for (int i = 0; i < pos; i++)
      if (d[i] <= d[pos]) L.push_back(d[i]);
    for (int i = pos + 1; i < d.size(); i++)
      if (d[i] >= d[pos]) R.push_back(d[i]);
    return LIS(L, -1) + 1 + LIS(R, -1);
  }
  int n = d.size();
  vector<int> dp(n + 1, inf);
  dp[0] = 0;
  for (int i = 0; i < n; i++) {
    int first = d[i];
    int j = upper_bound((dp).begin(), (dp).end(), d[i]) - dp.begin();
    chmin(dp[j], d[i]);
  }
  int res = 0;
  for (int i = 0; i <= n; i++)
    if (dp[i] != inf) res = i;
  return res;
}
int solve(vector<pair<int, int> > vp, int mustZero) {
  if (mustZero && count((vp).begin(), (vp).end(), make_pair(0, 0)) == 0)
    vp.push_back(make_pair(0, 0));
  sort((vp).begin(), (vp).end());
  int pos = -1;
  vector<int> d;
  for (int i = 0; i < vp.size(); i++) {
    if (vp[i] == make_pair(0, 0)) pos = i;
    d.push_back(vp[i].second);
  }
  if (!mustZero) pos = -1;
  return LIS(d, pos);
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> first[i] >> t[i];
  cin >> V;
  vector<pair<int, int> > vp;
  for (int i = 0; i < n; i++) {
    int p = V * t[i] - first[i];
    int q = V * t[i] + first[i];
    vp.push_back(make_pair(p, q));
  }
  int r1 = solve(vp, 1);
  if (count((vp).begin(), (vp).end(), make_pair(0, 0)) == 0) r1--;
  int r2 = solve(vp, 0);
  cout << r1 << " " << r2 << endl;
  return 0;
}
