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;
int n;
int V;
struct node {
  int x, t;
  long long he;
} a[4000005];
long long b[4000005];
map<long long, int> mp;
int m = 0;
bool cmp(node a, node b) {
  if (-a.x + a.t * V != -b.x + b.t * V) return -a.x + a.t * V < -b.x + b.t * V;
  return a.he < b.he;
}
int dp[4000005];
int c[4000005];
void modify(int x, int l, int r, int wh, int val) {
  if (l == r) {
    c[x] = val;
    return;
  }
  int mid = (l + r) / 2;
  if (mid >= wh)
    modify(x * 2, l, mid, wh, val);
  else
    modify(x * 2 + 1, mid + 1, r, wh, val);
  c[x] = max(c[x * 2], c[x * 2 + 1]);
}
int query(int x, int l, int r, int tx, int ty) {
  if (l >= tx && r <= ty) return c[x];
  int ret = 0;
  int mid = (l + r) / 2;
  if (mid >= tx) ret = max(ret, query(x * 2, l, mid, tx, ty));
  if (mid < ty) ret = max(ret, query(x * 2 + 1, mid + 1, r, tx, ty));
  return ret;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &a[i].x, &a[i].t);
  }
  scanf("%d", &V);
  for (int i = 1; i <= n; i++) {
    a[i].he = a[i].x + 1ll * V * a[i].t;
    b[i] = a[i].he;
  }
  sort(a + 1, a + n + 1, cmp);
  sort(b + 1, b + n + 1);
  for (int i = 1; i <= n; i++) {
    if (i == 1 || b[i] != b[i - 1]) {
      mp[b[i]] = ++m;
    }
  }
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    int t = mp[a[i].he];
    if (V * a[i].t < abs(a[i].x)) continue;
    dp[i] = query(1, 1, m, 1, t) + 1;
    ans = max(ans, dp[i]);
    modify(1, 1, m, t, dp[i]);
  }
  printf("%d ", ans);
  ans = 0;
  memset(dp, 0, sizeof(dp));
  memset(c, 0, sizeof(c));
  for (int i = 1; i <= n; i++) {
    int t = mp[a[i].he];
    dp[i] = query(1, 1, m, 1, t) + 1;
    ans = max(ans, dp[i]);
    modify(1, 1, m, t, dp[i]);
  }
  printf("%d\n", ans);
  return 0;
}
