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.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Locale;
import java.util.StringTokenizer;
import java.util.TreeSet;


public class F implements Runnable {

	
	HashMap<Long, Integer> mp = new HashMap<Long, Integer>();
	TreeSet<Long> 		  all = new TreeSet<Long>();
	
	int MAX = 1 << 17;
	
	int[] req = new int[MAX * 2];
	
	void clear() {
		Arrays.fill(req, 0);
	}
	
	int maxr(int l, int r, int lev) {
		if (r <= l) {
			return 0;
		}
		int ans = Math.max(req[l + lev], req[r - 1 + lev]);
		return Math.max(ans, maxr((l + 1) / 2, r / 2, lev / 2));
	}
	
	int maxr(int l, int r) {
		return maxr(l, r, MAX);
	}
	
	void addr(int pos, int val, int lev) {
		if (lev != 0) {
			req[pos + lev] = Math.max(req[pos + lev], val);
			addr(pos / 2, val, lev / 2);
		}		
	}
	
	void addr(int pos, int val) {
		addr(pos, val, MAX);
	}
	
	
	class Point implements Comparable<Point> {
		long x;
		long y;
		
		boolean reach;
		
		public String toString() {
			return "{" + x + ", " + y + ", " + reach + "}";
		}
		
		Point(long x, long t) {
			this.x = x;
			this.y = t;
		}
		
		@Override
		public int compareTo(Point o) {
			if (y == o.y) {
				if (x == o.x) {
					return 0;
				}
				return x - o.x > 0 ? 1 : -1;
			}
			return y - o.y > 0 ? 1 : -1;
		}
		void change(long v) {
			long tx = -x + y * v;
			long ty = x + y * v;
			x = tx;
			y = ty;
			reach = tx >= 0 && ty >= 0;
		}		
	}
	
	Point[] pt;
	
	
	
	private void solve() throws IOException {
		int n = nextInt();
		pt = new Point[n];
		long x, t;
		
		for (int i = 0; i < n; ++i) {
			x = nextLong();
			t = nextLong();
			pt[i] = new Point(x, t);
		}
		long v = nextLong();
		
		for (int i = 0; i < n; ++i) {
			pt[i].change(v);
			all.add(pt[i].x);
		}
		for (int i = 0; all.size() != 0; ++i) {
			mp.put(all.pollFirst(), i);
		}			
		Arrays.sort(pt);
//		for (Point p : pt) {
//			System.err.println(p);
//		}
		clear();
		int nx = 0;
		int ans1 = 0;
		int mx = 0;
		for (int i = 0; i < pt.length; ++i) {
			if (pt[i].reach) {
				nx = mp.get(pt[i].x);				
				mx = maxr(0, nx + 1);
//				System.err.println(pt[i] + " " + mx + " " + nx);
				ans1 = Math.max(ans1, mx + 1);
				addr(nx, mx + 1);
			}			
		}
		clear();
		int ans2 = 0;
		for (int i = 0; i < pt.length; ++i) {
			nx = mp.get(pt[i].x);
			mx = maxr(0, nx + 1);
			//System.err.println(pt[i].x + " " + nx + " " + mx);
			ans2 = Math.max(ans2, mx + 1);
			addr(nx, mx + 1);			
			
		}
		out.println(ans1 + " " + ans2);
	}
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		new Thread(new F()).start();

	}

	private BufferedReader br;
	private StringTokenizer st;
	private PrintWriter out;

	@Override
	public void run() {
		try {
			Locale.setDefault(Locale.US);
			br = new BufferedReader(new InputStreamReader(System.in));
			st = new StringTokenizer("");
			out = new PrintWriter(System.out);
			solve();
			out.close();			
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(-1);
		}
		
	}

	
	
	String next() throws IOException {
		while (!st.hasMoreTokens()) {
			String temp = br.readLine();
			if (temp == null) {
				return null;
			}
			st = new StringTokenizer(temp);
		}
		return st.nextToken();
	}

	int nextInt() throws IOException {
		return Integer.parseInt(next());
	}
	double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}
	long nextLong() throws IOException {		
		return Long.parseLong(next());
	}
	
}
