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;

#define pii pair<int,int>
#define ll long long
#define N (int)(1e5+10)
#define mod 1000000007
#define mp make_pair
#define pb push_back
#define nd second
#define st first
#define inf mod
#define endl '\n'
#define sag (sol|1)
#define sol (root<<1)
#define ort ((bas+son)>>1)
#define bit(x,y) ((x>>y)&1)
#define int long long 

int i,j,k,n,m,x[N],y,z;
int t[N],F[N],ans1,ans2;
int v;
pii A[N];
map<int,int> H;

bool cmp(pii a,pii b){
	if(a.nd != b.nd)
		return a.nd < b.nd;
	return a.st < b.st;
}

int upd(int x,int t){
	for( ; x ; x -= x&-x)
		F[x]=max(t,F[x]);
}

int que(int x){
	int ans = 0;
	for( ; x<N ; x += x&-x)
		ans = max(ans,F[x]);
	return ans;
}

main(){
	cin >> n;

	for(i=1 ; i<=n ; i++)
		scanf("%lld %lld",x+i,t+i);

	cin >> v;

	A[++n] = mp(0,0);

	for(i=1 ; i<=n ; i++)
		A[i] = mp(-x[i]+t[i]*v,+x[i]+t[i]*v);
	
	pii zero = mp(-x[i]+t[i]*v,H[x[i]+t[i]*v]);

	sort(A+1,A+1+n,cmp);

	H[A[1].nd] = 1;

	int s = 1;

	for(i=2 ; i<=n ; i++)
		if(A[i].nd != A[i-1].nd){
			H[A[i].nd] = ++s;
		}

	for(i=1 ; i<=n ; i++)
		A[i].nd = H[A[i].nd];

	zero = mp(zero.st,H[zero.nd]);

	sort(A+1,A+1+n);

	for(i=n ; i>=1 ; i--){
		if(A[i] == zero)
			ans1 = que(A[i].nd);
		else{
			ans2 = max(ans2,que(A[i].nd)+1);
			upd(A[i].nd,ans2);
		}
	}

	cout << ans1 << ' ' << ans2 << endl;
}
