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