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.math.*;
import static java.lang.Character.isDigit;
import static java.lang.Character.isLowerCase;
import static java.lang.Character.isUpperCase;
import static java.lang.Math.*;
import static java.math.BigInteger.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static java.lang.Character.isDigit;

public class Main{
    static void debug(Object...os){
        System.err.println(deepToString(os));
    }
    class E implements Comparable<E>{
        long x,t;
        int i;
        long X,Y;
        public E(long x,long t,int i){
            super();
            this.x=x;
            this.t=t;
            this.i=i;
        }
        public int compareTo(E o){
            return Long.signum(X==o.X ? Y-o.Y : X-o.X);
        }
        public String toString(){
            return "E [X="+X+", Y="+Y+", i="+i+", t="+t+", x="+x+"]";
        }
        
    }
    void run(){
        N=nextInt();
        es=new E[N];
        for(int i=0;i<N;i++)es[i] = new E(nextLong(),nextLong(),i);
        V=nextLong();
        for(int i=0;i<N;i++) {
            es[i].X = - (es[i].t*V-es[i].x);
            es[i].Y = - (es[i].t*V+es[i].x);
        }
        sort(es);
        System.out.println(solve());
    }
    int N;
    long V;
    E[] es;
    String solve() {
        RunningMaxes rm = new RunningMaxes(N);
        TreeSet<Long> yset=new TreeSet<Long>();
        for(int i=0;i<N;i++)yset.add(es[i].Y);
        long[] ys=tols(yset.toArray(new Long[0]));
        int[] dp=new int[N];
        for(int i=0;i<N;i++) {
            int p = binarySearch(ys,es[i].Y);
            dp[i] = 1 + rm.getMax(p);
            rm.update(p,dp[i]);
        }
//      debug(dp);
        long res1=0;
        for(int i=0;i<N;i++)if(es[i].X<=0 && es[i].Y<=0)res1=max(res1,dp[i]);
        long res2=0;
        for(int i=0;i<N;i++)res2=max(res2,dp[i]);
        return res1+" "+res2;
    }
    long[] tols(Long[] Ls){
        long[] ls=new long[Ls.length];
        for(int i=0;i<ls.length;i++){
            ls[i]=Ls[i];
        }
        return ls;
    }
    
    static class RunningMaxes {
        int[] v;
 
        public RunningMaxes(int size) {
            v = new int[size];
        }
 
        public void update(int at, int what) {
            if (at < 0) at = 0;
            while (at < v.length) {
                v[at] = Math.max(v[at], what);
                at = at | (at + 1);
            }
        }
 
        public int getMax(int right) {
            int res = 0;
            while (right >= 0) {
                res = Math.max(res, v[right]);
                right = (right & (right + 1)) - 1;
            }
            return res;
        }
    }

    int nextInt(){
        try{
            int c=System.in.read();
            if(c==-1) return c;
            while(c!='-'&&(c<'0'||'9'<c)){
                c=System.in.read();
                if(c==-1) return c;
            }
            if(c=='-') return -nextInt();
            int res=0;
            do{
                res*=10;
                res+=c-'0';
                c=System.in.read();
            }while('0'<=c&&c<='9');
            return res;
        }catch(Exception e){
            return -1;
        }
    }
    
    long nextLong(){
        try{
            int c=System.in.read();
            if(c==-1) return -1;
            while(c!='-'&&(c<'0'||'9'<c)){
                c=System.in.read();
                if(c==-1) return -1;
            }
            if(c=='-') return -nextLong();
            long res=0;
            do{
                res*=10;
                res+=c-'0';
                c=System.in.read();
            }while('0'<=c&&c<='9');
            return res;
        }catch(Exception e){
            return -1;
        }
    }
    
    double nextDouble(){
        return Double.parseDouble(next());
    }
    
    String next(){
        try{
            StringBuilder res=new StringBuilder("");
            int c=System.in.read();
            while(Character.isWhitespace(c))
                c=System.in.read();
            do{
                res.append((char)c);
            }while(!Character.isWhitespace(c=System.in.read()));
            return res.toString();
        }catch(Exception e){
            return null;
        }
    }
    
    String nextLine(){
        try{
            StringBuilder res=new StringBuilder("");
            int c=System.in.read();
            while(c=='\r'||c=='\n')
                c=System.in.read();
            do{
                res.append((char)c);
                c=System.in.read();
            }while(c!='\r'&&c!='\n');
            return res.toString();
        }catch(Exception e){
            return null;
        }
    }
    public static void main(String[] args){
        new Main().run();
    }
}