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

//package ausoi;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

public class F {
	Scanner in;
	PrintWriter out;
	String INPUT = "";
	
	void solve()
	{
		int n = ni();
		final int[] x = new int[n];
		final int[] t = new int[n];
		int[] a = new int[n];
		int[] b = new int[n];
		for(int i = 0;i < n;i++){
			x[i] = ni();
			t[i] = ni();
		}
		int v = ni();
		for(int i = 0;i < n;i++){
			a[i] = t[i] * v - x[i];
			b[i] = t[i] * v + x[i];
		}
		
		Integer[] ord = new Integer[n];
		for(int i = 0;i < n;i++){
			ord[i] = i;
		}
		Arrays.sort(ord, new Comparator<Integer>(){
			public int compare(Integer x, Integer y)
			{
				return t[x] - t[y];
			}
		});
		
		P[] ps = new P[n];
		for(int i = 0;i < n;i++){
			ps[i] = new P(a[i], b[i]);
			ps[i].ind = i;
		}
		build(ps);
//		tr(ps);
//		tr(sups);
//		tr(lower);
//		tr(upper);
		int[] iord = new int[n];
		for(int i = 0;i < n;i++){
			iord[ps[i].ind] = i;
		}
		
		int m2 = 0;
		int[] dp = new int[n];
		int[] f = new int[n];
		for(int i = 0;i < n;i++){
			int aa = t[ord[i]]*v - x[ord[i]];
			int bb = t[ord[i]]*v + x[ord[i]];
			f[iord[ord[i]]] = dp[i] = max(ps, f, Integer.MIN_VALUE / 3, Integer.MIN_VALUE / 3, aa+1, bb+1) + 1;
			m2 = Math.max(m2, dp[i]);
		}
		int m1 = 0;
		for(int i = 0;i < n;i++){
			int aa = t[ord[i]]*v - x[ord[i]];
			int bb = t[ord[i]]*v + x[ord[i]];
			if(aa >= 0 && bb >= 0){
				m1 = Math.max(m1, dp[i]);
			}
		}
		out.println(m1 + " " + m2);
	}
	
		public static int max(P[] ps, int[] f, int x1, int y1, int x2, int y2)
		{
			return max(ps, f, 0, ps.length, x1, y1, x2, y2, sups[ps.length], true);
		}
		
		public static int max(P[] ps, int[] f, int inf, int sup, int x1, int y1, int x2, int y2, int e, boolean isx)
		{
			if(sup - inf == 0)return 0;
			if(sup - inf == 1)return f[inf];
			
			int max = 0;
			int minf = e;
			int msup = sups[e];
//			System.err.println(x2+" " + y2 + " " + inf + " " + sup + " " + minf + " " + msup);
			if(isx){
				if(x1 <= ps[e].x && ps[e].x < x2){
					int indinf = Arrays.binarySearch(ps, minf, msup, new P(ps[e].x, y1), pxc);
//					System.err.println(y1);
					if(indinf < 0)indinf = -indinf - 1;
					int indsup = Arrays.binarySearch(ps, minf, msup, new P(ps[e].x, y2), pxc);
					if(indsup < 0)indsup = -indsup - 1;
//					System.err.println(indinf + " " + indsup);
					
					for(int i = indinf;i < indsup;i++){
						max = Math.max(max, f[i]);
					}
				}
				if(x1 < ps[e].x){
					max = Math.max(max, max(ps, f, inf, minf, x1, y1, ps[e].x, y2, lower[e], !isx));
				}
				if(ps[e].x+1 < x2){
					max = Math.max(max, max(ps, f, msup, sup, ps[e].x+1, y1, x2, y2, upper[e], !isx));
				}
			}else{
				if(y1 <= ps[e].y && ps[e].y < y2){
					int indinf = Arrays.binarySearch(ps, minf, msup, new P(x1, ps[e].y), pyc);
					if(indinf < 0)indinf = -indinf - 1;
					int indsup = Arrays.binarySearch(ps, minf, msup, new P(x2, ps[e].y), pyc);
					if(indsup < 0)indsup = -indsup - 1;
					for(int i = indinf;i < indsup;i++){
						max = Math.max(max, f[i]);
					}
				}
				if(y1 < ps[e].y){
					max = Math.max(max, max(ps, f, inf, minf, x1, y1, x2, ps[e].y, lower[e], !isx));
				}
				if(ps[e].y+1 < y2){
					max = Math.max(max, max(ps, f, msup, sup, x1, ps[e].y+1, x2, y2, upper[e], !isx));
				}
			}
			return max;
		}
		
		public static void build(P[] ps)
		{
			int n = ps.length;
			sups = new int[n+1];
			lower = new int[n];
			upper = new int[n];
			sups[n] = build(ps, 0, n, true);
		}
		
		static int[] sups, lower, upper;
		
		static Comparator<P> pxc = new PXComp();
		static Comparator<P> pyc = new PYComp();
		
		public static int build(P[] ps, int inf, int sup, boolean isx)
		{
			if(sup-inf <= 1)return inf;
			
			Arrays.sort(ps, inf, sup, isx ? pxc : pyc);
			int mid = (inf+sup)/2;
			
			int minf, msup;
			if(isx){
				{
					int s = inf, e = mid;
					while(e - s > 1){
						int m = (e+s)/2;
						if(ps[m].x == ps[mid].x){
							e = m;
						}else{
							s = m;
						}
					}
					minf = s;
					if(ps[minf].x < ps[mid].x)minf++;
				}
				{
					int s = mid, e = sup;
					while(e - s > 1){
						int m = (e+s)/2;
						if(ps[m].x == ps[mid].x){
							s = m;
						}else{
							e = m;
						}
					}
					msup = s+1;
				}
			}else{
				{
					int s = inf, e = mid;
					while(e - s > 1){
						int m = (e+s)/2;
						if(ps[m].y == ps[mid].y){
							e = m;
						}else{
							s = m;
						}
					}
					minf = s;
					if(ps[minf].y != ps[mid].y)minf++;
				}
				{
					int s = mid, e = sup;
					while(e - s > 1){
						int m = (e+s)/2;
						if(ps[m].y == ps[mid].y){
							s = m;
						}else{
							e = m;
						}
					}
					msup = s+1;
				}
			}
			
			sups[minf] = msup;
			lower[minf] = build(ps, inf, minf, !isx);
			upper[minf] = build(ps, msup, sup, !isx);
			return minf;
		}
		
		public static class P
		{
			public int x, y;
			public int ind;
			public P(int x, int y){
				this.x = x;
				this.y = y;
			}
			
			public String toString()
			{
				return "(" + x + ", " + y + ")";
			}
		}
		
		public static class PXComp implements Comparator<P>
		{
			public int compare(P a, P b)
			{
				if(a.x != b.x)return a.x - b.x;
				return a.y - b.y;
			}
		}
		
		public static class PYComp implements Comparator<P>
		{
			public int compare(P a, P b)
			{
				if(a.y != b.y)return a.y - b.y;
				return a.x - b.x;
			}
		}
	
	void run() throws Exception
	{
		in = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(INPUT);
		out = new PrintWriter(System.out);

		solve();
		out.flush();
	}
	
	
	public static void main(String[] args) throws Exception
	{
		new F().run();
	}
	
	int ni() { return Integer.parseInt(in.next()); }
	void tr(Object... o) { if(INPUT.length() != 0)System.out.println(Arrays.deepToString(o)); }
}
