#include <bits/stdc++.h>
using namespace std;
struct Node {
  int x, t, whe, s, s2;
} a[100100];
int n, t_cnt, V, ans, ans2, Mint = (1 << 30);
int f[100100], f2[100100], Max[100100 * 4], Max2[100100 * 4];
bool cmp(Node x, Node y) { return x.s > y.s || (x.s == y.s && x.s2 < y.s2); }
bool cmp2(Node x, Node y) { return x.s2 < y.s2 || (x.s2 == y.s2 && x.t < y.t); }
int Maxans1, Maxans2;
void find(int node, int l, int r, int ll, int rr) {
  if (l > rr || ll > r) return;
  if (ll <= l && rr >= r) {
    Maxans1 = max(Max[node], Maxans1);
    Maxans2 = max(Max2[node], Maxans2);
    return;
  }
  int mid = (l + r) >> 1, son = node << 1;
  find(son, l, mid, ll, rr);
  find(son | 1, mid + 1, r, ll, rr);
}
void push(int node, int l, int r, int hig, int whe) {
  if (l == r) {
    Max[node] = max(f[whe], Max[node]);
    Max2[node] = max(f2[whe], Max2[node]);
    return;
  }
  int mid = (l + r) >> 1, son = node << 1;
  if (hig > mid)
    push(son | 1, mid + 1, r, hig, whe);
  else
    push(son, l, mid, hig, whe);
  Max[node] = max(Max[son], Max[son | 1]);
  Max2[node] = max(Max2[son], Max2[son | 1]);
}
void work() {
  for (int i = 1; i <= n; i++) {
    Maxans1 = 0;
    Maxans2 = 0;
    find(1, 1, t_cnt, 1, a[i].s2);
    if (!Maxans1) {
      if (a[i].t * V >= abs(a[i].x)) f[i] = 1;
    } else
      f[i] = Maxans1 + 1;
    f2[i] = Maxans2 + 1;
    push(1, 1, t_cnt, a[i].s2, i);
    ans = max(f[i], ans);
    ans2 = max(f2[i], ans2);
  }
  printf("%d %d", ans, ans2);
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%d %d", &a[i].x, &a[i].t);
  }
  cin >> V;
  for (int i = 1; i <= n; i++)
    a[i].s = a[i].x - a[i].t * V, a[i].s2 = a[i].x + a[i].t * V;
  sort(a + 1, a + n + 1, cmp2);
  for (int i = 1; i <= n; i++) {
    if (a[i].s2 != a[i - 1].s2) t_cnt++;
    a[i].s2 = t_cnt;
  }
  sort(a + 1, a + n + 1, cmp);
  work();
}
