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

// ConsoleApplication5.cpp: ���������� ����� ����� ��� ����������� ����������.
//

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

const int INF = 1000001;
vector<int> d(INF, INF);
int e[INF][2];
int p[INF];
int main()
{
	ios_base::sync_with_stdio(false);
	int n, v, x = 0;
	cin >> n;
	e[0][0] = e[0][1] = 0;
	for (int i = 1; i <= n; ++i)
		cin >> e[i][0] >> e[i][1];
	cin >> v;
	d[0] = -INF;
	p[0] = 0;
	for (int i = 1; i <= n; ++i)
	{
		int j = upper_bound(d.begin(), d.end(), e[i][1]) - d.begin();
		if (d[j - 1] < e[i][1] && e[i][1] < d[j]
			&& (e[i][1] - e[p[j - 1]][1]) * v >= abs(e[i][0] - e[p[j - 1]][0]))
		{
			d[j] = e[i][1];
			p[j] = i;
		}
	}
	int res1 = lower_bound(d.begin(), d.end(), INF) - d.begin() - 1;
	int res2;
	for (int i = 1; i <= n; ++i)
	{
		d.resize(INF, INF);
		d[0] = -INF;
		p[0] = i;
		for (int k = i + 1; k <= n; ++k)
		{
			int j = upper_bound(d.begin(), d.end(), e[k][1]) - d.begin();
			if (d[j - 1] < e[k][1] && e[k][1] < d[j]
				&& (e[k][1] - e[p[k - 1]][1]) * v >= abs(e[k][0] - e[p[j - 1]][0]))
			{
				d[j] = e[k][1];
				p[j] = k;
			}
		}
		res2 = max(res2, lower_bound(d.begin(), d.end(), INF) - d.begin());
	}
	cout << res1 << " " << res2 << endl;
    return 0;
}

