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 bisect
from math import inf


def find_LIS(a):
    if len(a) == 1:
        return 1

    n = len(a)
    d = []
    length = 0

    d.append(-inf)
    for i in range(1, n):
        d.append(inf)

    for i in range(0, n):
        j = bisect.bisect(d, a[i])
        if j == n:
            length += 1
            break
        if d[j - 1] <= a[i] <= d[j]:
            d[j] = a[i]
            if j >= length:
                length = j
    return length


def fill_Arrays(a, b, n):
    for i in range(n):
        a_, b_ = [int(j) for j in input().split()]
        a.append(a_)
        b.append(b_)


def transform_Array(a, x, t, n, v, temp):
    for i in range(n):
        k = (-x[i] + v * t[i], x[i] + v * t[i])
        a.append(k)
        temp.append(-x[i] + v * t[i])


def clear_List_(f_list_, n):
    flag = 1
    i = 0
    while i != n:
        if f_list_[i] == 0:
            flag = 0
        if f_list_[i] > 0 and flag == 1:
            f_list_.pop(i)
            i -= 1
            n -= 1
        if f_list_[i] < 0 and flag == 0:
            f_list_.pop(i)
            i -= 1
            n -= 1
        i += 1



n = int(input())
x = []
t = []
fill_Arrays(x, t, n)
v = int(input())

list_ = []
temp_list = []

transform_Array(list_, x, t, n, v, temp_list)

list_.sort()

temp = bisect.bisect(temp_list, 0) - 1

f_list_ = []
for i in range(n):
    f_list_.append(list_[i][1])

res_1 = find_LIS(f_list_)
f_list_.insert(temp, 0)
clear_List_(f_list_, n)
res_2 = find_LIS(f_list_)

print(res_2 - 1, res_1)