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 long long INF = 1 << 28;
const long long LINF = 1ll << 61;
inline long long getnum() {
  register long long r = 0;
  register bool ng = 0;
  register char c;
  c = getchar();
  while (c != '-' && (c < '0' || c > '9')) c = getchar();
  if (c == '-') ng = 1, c = getchar();
  while (c != ' ' && c != '\n') r = r * 10 + c - '0', c = getchar();
  if (ng) r = -r;
  return r;
}
template <class T>
inline void putnum(T x) {
  if (x < 0) putchar('-'), x = -x;
  register short a[20] = {}, sz = 0;
  while (x > 0) a[sz++] = x % 10, x /= 10;
  if (sz == 0) putchar('0');
  for (int i = sz - 1; i >= 0; i--) putchar('0' + a[i]);
}
inline void putsp() { putchar(' '); }
inline void putendl() { putchar('\n'); }
inline char mygetchar() {
  register char c = getchar();
  while (c == ' ' || c == '\n') c = getchar();
  return c;
}
struct BIT {
  int mx[100111];
  void init() { memset(mx, 0, sizeof(mx)); }
  void change(int x, int y) {
    while (x <= 100005) {
      mx[x] = max(mx[x], y);
      x += x & (-x);
    }
  }
  int query(int x) {
    int ans = 0;
    while (x > 0) {
      ans = max(ans, mx[x]);
      x -= x & (-x);
    }
    return ans;
  }
} bit;
int V;
struct data {
  int x, y, lid, rid;
  bool operator<(const data &tmp) const {
    return make_pair(rid, x) < make_pair(tmp.rid, tmp.x);
  }
} a[100111];
vector<long long> v1, v2;
int n;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &a[i].y, &a[i].x);
  }
  scanf("%d", &V);
  for (int i = 1; i <= n; i++) {
    v1.push_back(a[i].y - 1ll * a[i].x * V);
    v2.push_back(a[i].y + 1ll * a[i].x * V);
  }
  sort(v1.begin(), v1.end());
  v1.erase(unique(v1.begin(), v1.end()), v1.end());
  sort(v2.begin(), v2.end());
  v2.erase(unique(v2.begin(), v2.end()), v2.end());
  for (int i = 1; i <= n; i++) {
    a[i].lid = lower_bound(v1.begin(), v1.end(), a[i].y - 1ll * a[i].x * V) -
               v1.begin() + 1;
    a[i].rid = lower_bound(v2.begin(), v2.end(), a[i].y + 1ll * a[i].x * V) -
               v2.begin() + 1;
  }
  sort(a + 1, a + n + 1);
  int ans1 = 0, ans2 = 0;
  bit.init();
  for (int i = 1; i <= n; i++) {
    if (a[i].y > 1ll * a[i].x * V || -a[i].y > 1ll * a[i].x * V) continue;
    int id = n - a[i].lid + 1, t = bit.query(id) + 1;
    bit.change(id, t);
    ans1 = max(ans1, t);
  }
  bit.init();
  for (int i = 1; i <= n; i++) {
    int id = n - a[i].lid + 1, t = bit.query(id) + 1;
    bit.change(id, t);
    ans2 = max(ans2, t);
  }
  cout << ans1 << " " << ans2 << endl;
  return 0;
}
