#include <bits/stdc++.h>
using namespace std;
int N, V, Ans1, Ans2;
struct Node {
  int p, q;
  bool operator<(Node o) const { return p < o.p || (p == o.p && q < o.q); }
} s[102012];
vector<int> S;
int main() {
  scanf("%d", &N);
  for (int i = 1; i <= N; ++i) {
    scanf("%d %d", &s[i].p, &s[i].q);
  }
  scanf("%d", &V);
  for (int i = 1; i <= N; ++i) {
    int x = -s[i].p + V * s[i].q, y = s[i].p + V * s[i].q;
    s[i].p = x;
    s[i].q = y;
  }
  sort(s + 1, s + N + 1);
  S.push_back(s[1].q);
  S.push_back(2000000000);
  for (int i = 2; i <= N; ++i) {
    vector<int>::iterator o = upper_bound(S.begin(), S.end(), s[i].q);
    if (*o == 2000000000) {
      *o = s[i].q;
      S.push_back(2000000000);
    } else {
      *o = s[i].q;
    }
  }
  Ans2 = S.size() - 1;
  S.erase(S.begin(), S.end());
  S.push_back(0);
  S.push_back(2000000000);
  for (int i = 1; i <= N; ++i)
    if (s[i].p >= 0 && s[i].q >= 0) {
      vector<int>::iterator o = upper_bound(S.begin(), S.end(), s[i].q);
      if (*o == 2000000000) {
        *o = s[i].q;
        S.push_back(2000000000);
      } else {
        *o = s[i].q;
      }
    }
  Ans1 = S.size() - 2;
  cout << Ans1 << ' ' << Ans2 << endl;
  return 0;
}
