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 INF = (int)1E9;
const long long LINF = (long long)1E18;
const long double PI = acos(-1.0);
const long double EPS = 1E-9;
template <typename T>
T gcd(T a, T b) {
  return (b == 0) ? abs(a) : gcd(b, a % b);
}
template <typename T>
inline T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
template <typename T>
inline T mod(T a, T b) {
  a %= b;
  if (a < 0) a += b;
  return a;
}
template <typename T>
inline T sqr(T x) {
  return x * x;
}
template <typename T>
inline T gmax(T a, T b) {
  return (a > b ? a : b);
}
template <typename T>
inline T gmin(T a, T b) {
  return (a < b ? a : b);
}
template <typename T>
inline string toString(T x) {
  ostringstream oss;
  oss << x;
  return oss.str();
}
inline long long toInt(const string& st) {
  istringstream iss(st);
  long long x;
  iss >> x;
  return x;
}
inline long double toDouble(const string& st) {
  istringstream iss(st);
  long double x;
  iss >> x;
  return x;
}
inline string toLower(string st) {
  for (int i = 0; i < (((int)(st).size())); i++) st[i] = tolower(st[i]);
  return st;
}
inline string toUpper(string st) {
  for (int i = 0; i < (((int)(st).size())); i++) st[i] = toupper(st[i]);
  return st;
}
bool LOCAL = false, OUTPUT = true;
const char DEBUG_PARAM[] = "__LOCAL_TESTING";
const char IN[] = "input.txt";
const char OUT[] = "output.txt";
inline void init();
inline void run();
int ntest = 0, test;
int main(int argc, char* argv[]) {
  if (argc > 1 && strcmp(argv[1], DEBUG_PARAM) == 0) {
    LOCAL = true;
    freopen(IN, "r", stdin);
  }
  init();
  if (ntest == 0) {
    cerr << "ntest = ?" << endl;
    return 0;
  }
  for (test = 1; test <= ntest; ++test) {
    run();
  }
  return 0;
}
inline void stop() { ntest = test - 1; }
const int dx[] = {-1, 0, 0, 1};
const int dy[] = {0, -1, 1, 0};
inline void init() {
  OUTPUT = true;
  ntest = 1;
}
const int maxn = 100000 + 5;
struct point {
  long long x, y;
};
point a[maxn];
long long n, v;
long long f[maxn];
void transform() {
  long long p, q;
  for (int i = (1); i <= (n); i++) {
    p = a[i].x;
    q = a[i].y;
    a[i].x = -p + q * v;
    a[i].y = p + q * v;
  }
}
inline bool compare(const point& a, const point& b) {
  if (a.x != b.x) return a.x < b.x;
  return a.y < b.y;
}
int find(long long value) {
  int l = 0, r = n + 1;
  int mid;
  while (l + 1 < r) {
    mid = (l + r) >> 1;
    if (f[mid] <= value)
      l = mid;
    else
      r = mid;
  }
  return l;
}
void solve() {
  transform();
  sort(a + 1, a + 1 + n, compare);
  for (int i = (0); i <= (n + 1); i++) f[i] = 1000000000000000000LL;
  f[0] = -1000000000000000000LL;
  int pos;
  int res = 0;
  for (int i = (1); i <= (n); i++) {
    pos = find(a[i].y);
    res = gmax(res, pos + 1);
    if (f[pos + 1] > a[i].y) f[pos + 1] = a[i].y;
  }
  n++;
  a[n].x = a[n].y = 0;
  sort(a + 1, a + 1 + n, compare);
  int r = 1;
  for (int k = (1); k <= (n); k++)
    if (a[k].x == 0 && a[k].y == 0) {
      for (int i = (0); i <= (n + 1); i++) f[i] = 1000000000000000000LL;
      f[0] = -1000000000000000000LL;
      f[1] = 0;
      for (int i = (k + 1); i <= (n); i++) {
        pos = find(a[i].y);
        if (pos == 0) continue;
        r = gmax(r, pos + 1);
        if (f[pos + 1] > a[i].y) f[pos + 1] = a[i].y;
      }
      break;
    }
  cout << r - 1 << " " << res;
}
inline void run() {
  cin >> n;
  for (int i = (1); i <= (n); i++) cin >> a[i].x >> a[i].y;
  cin >> v;
  solve();
}
