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 double eps = 1e-8;
long long UPPER = 3 * 1000000 * 1000ll;
map<long long, int> BIT, BIT1;
void in(long long where, int t, map<long long, int> &BIT) {
  where += 2000000000ll;
  while (where <= UPPER * 2) {
    BIT[where] = max(t, BIT[where]);
    where += (where & -where);
  }
}
int out(long long where, map<long long, int> &BIT) {
  int ret = 0;
  where += 2000000000ll;
  while (where) {
    map<long long, int>::iterator it = BIT.find(where);
    if (it != BIT.end()) ret = max(ret, it->second);
    where -= (where & -where);
  }
  return ret;
}
int n;
long long v;
pair<long long, long long> inc[1000007];
int f1[1000007], f2[1000007];
int ans1, ans2;
void fuck() {
  BIT.clear();
  BIT1.clear();
  for (int i = 0; i < n; i++) swap(inc[i].first, inc[i].second);
  sort(inc, inc + n);
  for (int i = 0; i < n; i++) swap(inc[i].first, inc[i].second);
  for (int i = 0; i < n; ++i) {
    f2[i] = out(inc[i].first * v - inc[i].second, BIT);
    f2[i] = max(f2[i], out(inc[i].first * v + inc[i].second, BIT1));
    ++f2[i];
    in(inc[i].first * v - inc[i].second, f2[i], BIT);
    in(inc[i].first * v + inc[i].second, f2[i], BIT1);
    ans2 = max(ans2, f2[i]);
  }
}
void fuck1() {
  BIT.clear();
  BIT1.clear();
  for (int i = 0; i < n; ++i) {
    f1[i] = 0;
    if (inc[i].first * v - inc[i].second < 0) continue;
    f1[i] = out(inc[i].first * v - inc[i].second, BIT);
    f1[i] = max(f1[i], out(inc[i].first * v + inc[i].second, BIT1));
    ++f1[i];
    in(inc[i].first * v - inc[i].second, f1[i], BIT);
    in(inc[i].first * v + inc[i].second, f1[i], BIT1);
    ans1 = max(ans1, f1[i]);
  }
}
int main() {
  ans1 = ans2 = 0;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> inc[i].second >> inc[i].first;
  cin >> v;
  fuck();
  fuck1();
  cout << ans1 << " " << ans2 << endl;
  return 0;
}
