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.util.*;
import java.io.*;

public class CdfF {
    class Point implements Comparable<Point> {
        long x, t;
        long A, B;
        
        public Point(long x, long t) {
            this.x = x;
            this.t = t;
        }
        
        public int compareTo(Point other) {
            if (this.A != other.A)
                return (this.A < other.A ? -1 : 1);
            else
                return (this.B < other.B ? -1 : 1);
        }
    }
    
    Point[] pnt;
    long[] allB;
    long V;
    
    class Maximizer {
        int[] A;
        
        public Maximizer(int N) {
            this.A = new int[N + 1];
            Arrays.fill(A, -1000000000);
        }
        
        int getMax(int pos) {
            int res = -1000000000;
            while (pos > 0) {
                res = Math.max(res, A[pos]);
                pos = (pos & (pos - 1));
            }
            return res;
        }
        
        void update(int pos, int value) {
            while (pos < A.length) {
                A[pos] = Math.max(A[pos], value);
                pos = (pos | (pos - 1)) + 1;
            }
        }
    }
    
    int solve(boolean fixedStart) {
        Maximizer m = new Maximizer(pnt.length);
        int ans = 0;
        for (int i=0; i < pnt.length; i++) {
            int pos = Arrays.binarySearch(allB, pnt[i].B) + 1;
            int maxSoFar = m.getMax(pos);
            
            int newValue = maxSoFar + 1;
            
            if (fixedStart) {
                if (Math.abs(pnt[i].x) <= V * pnt[i].t)
                    newValue = Math.max(newValue, 1);
            } else {
                newValue = Math.max(newValue, 1);
            }
            
            ans = Math.max(ans, newValue);
            m.update(pos, newValue);
        }
        return ans;
    }
    
    public void go() throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int N = Integer.parseInt(br.readLine());
        pnt = new Point[N];
        for (int i=0; i < N; i++) {
            StringTokenizer st = new StringTokenizer(br.readLine());
            int x = Integer.parseInt(st.nextToken());
            int t = Integer.parseInt(st.nextToken());
            pnt[i] = new Point(x, t);
        }
        V = Integer.parseInt(br.readLine());
        br.close();
        
        for (int i=0; i < N; i++) {
            pnt[i].A = V * pnt[i].t + pnt[i].x;
            pnt[i].B = V * pnt[i].t - pnt[i].x;
        }
        
        Arrays.sort(pnt);
        
        allB = new long[N];
        for (int i=0; i < N; i++)
            allB[i] = pnt[i].B;
        
        Arrays.sort(allB);
        
        System.out.println(solve(true) + " " + solve(false));
    }
    
    public static void main(String[] args) throws Exception {
        (new CdfF()).go();
    }
}
