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

#include <bits\stdc++.h>
using namespace std;

#define VIC ios::sync_with_stdio(0);cin.tie(0);ios_base::sync_with_stdio(0);
#define sfi(x) scanf("%d", &x)
#define sfi2(x, y) scanf("%d%d", &x,&y)
#define sfl2(x, y) scanf("%I64d%I64d", &x,&y)
#define sfl(x) scanf("%I64d", &x)
#define sfd(x) scanf("%lf", &x)
#define sfd2(x, y) scanf("%lf%lf", &x, &y)
#define sfs(x) scanf("%s", &x)
#define wtf(s) freopen((s), "w", stdout)
#define rff(s) freopen((s), "r", stdin)
#define mod 998244353
#define pi (2 * acos(0))
#define x first
typedef long double ld;
typedef long long ll;
const int N = 1e5 + 5;
//g++ -std=c++11 main.cpp && a.exe
ll n, maxiv;
vector<pair<ll, ll>> a;

ll find_lis(ll beg)
{
    vector<int> b, p(a.size());
    int u, v;
    if (beg == 0)
        b.push_back(0);
    b.push_back(1);
    for (int i = 2; i < (int)a.size(); i++)
    {
        if (a[b.back()].second <= a[i].second)
        {
            p[i] = b.back();
            b.push_back(i);
            continue;
        }
        for (u = 0, v = b.size() - 1; u < v;)
        {
            int c = (u + v) / 2;
            if (a[b[c]].second <= a[i].second)
                u = c + 1;
            else
                v = c;
        }
        if (a[i].second <= a[b[u]].second)
        {
            if (u > 0)
                p[i] = b[u - 1];
            b[u] = i;
        }
    }
    return b.size();
}

int main()
{
    VIC
    ll x, y;
    cin >> n;
    a.resize(n + 1);
    a[0] = {0, 0};
    for (int i = 1; i <= n; i++)
        cin >> a[i].first >> a[i].second;
    cin >> maxiv;
    n++;
    for (int i = 0; i < n; i++)
        x = a[i].first, y = a[i].second, a[i].first = -x + y * maxiv, a[i].second = x + y * maxiv;
    sort(a.begin(), a.end());
    cout << find_lis(0) - 1 << ' ' << find_lis(1);
    return 0;
}
