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

import java.io.*;
import java.util.*;
public class f {
public static void main(String[] args) throws IOException {
	input.init(System.in);
	PrintWriter out = new PrintWriter(System.out);
	int n = input.nextInt();
	int[] xs = new int[n], ts = new int[n];
	for(int i = 0; i<n; i++)
	{
		xs[i] = input.nextInt();
		ts[i] = input.nextInt();
	}
	long v = input.nextLong();
	Point[] data = new Point[n];
	for(int i= 0; i<n; i++)
	{
		data[i] = new Point(xs[i] + v * ts[i], xs[i] - v * ts[i]);
		//out.println(data[i].x+" "+data[i].y);
	}
	Arrays.sort(data);
	long[] a = new long[n];
	for(int i = 0; i<n; i++) a[i] = data[i].x;
	//out.println(Arrays.toString(a));
	int lis = lis(a, -1);
	int idx = -1;
	for(int i = 0; i<n; i++)
	{
		if(data[i].x == xs[0] + v * ts[0] && data[i].y == xs[0] - v * ts[0]) idx = i;
	}
	//out.println(idx+" "+Arrays.toString(a));
	int lis0 = lis(a, idx);
	out.println(lis0+" "+lis);
	out.close();
}
//Longest strictly increasing subsequence - O(n*log(n))
static int lis(long[] data, int idx)
{
int n = data.length;
int[] dp = new int[n+1];
Arrays.fill(dp, -1);
for(int i = 0; i<n; i++)
{
	int lo = -1, hi = n;
	while(lo < hi - 1)
	{
		int mid = (lo+hi)/2;
		if(dp[mid] != -1 && data[dp[mid]] >= data[i]) lo = mid;
		else hi = mid;
	}
	dp[hi] = i;
	//System.out.println(i+" "+hi);
	if(i == idx) return hi+1;
}
int res = 0;
while(dp[res] != -1) res++;
return res;
}
static class Point implements Comparable<Point>
{
	long x, y;
	public Point(long xx, long yy)
	{
		x = xx; y = yy;
	}
	@Override
	public int compareTo(Point o) {
		//if(x != o.x) return Long.compare(x, o.x);
		if(y != o.y) return Long.compare(y, o.y);
		return Long.compare(o.x, x);
	}
}
public static class input {
	static BufferedReader reader;
	static StringTokenizer tokenizer;

	static void init(InputStream input) {
		reader = new BufferedReader(new InputStreamReader(input));
		tokenizer = new StringTokenizer("");
	}

	static String next() throws IOException {
		while (!tokenizer.hasMoreTokens())
			tokenizer = new StringTokenizer(reader.readLine());
		return tokenizer.nextToken();
	}

	static int nextInt() throws IOException {
		return Integer.parseInt(next());
	}

	static double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}

	static long nextLong() throws IOException {
		return Long.parseLong(next());
	}
}
}

