#include <iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
using namespace std;
const int maxn = 1023;
const int maxe = 800000;
/*************荳?握蝗セ蛹ケ驟肴ィ。譚ソ**********************/

int first[maxn],nxt[maxe],E[maxe],M;
int all, match[maxn];//all陦ィ遉コ蝗セ荳顔噪諤サ轤ケ謨ー,match陦ィ遉コ豈丈クェ轤ケ逧?嘗荳?クェ蛹ケ驟咲せ?育せ逧??蜿キ莉?蛻ーn, 蟷カ荳蚤ll>n ,蜈カ螳樔ケ溷庄莉・莉?蛻ーn-1荵溯。鯉シ?
int que[maxn], pre[maxn], base[maxn];
bool ha[maxn];
bool blossom[maxn];
void init(int n) {
   
	memset(first,-1,sizeof(first));
	M=-1;
	//all = n+1;//荳矩擇蜉?セケ逧?慮蛟吝庄莉・譖エ譁ー豁、蛟シ?梧園莉・邇ー蝨ィ荳咲畑譖エ譁ー
}
void _insert(int u,int v)
{
	M++;
	nxt[M]=first[u];
	first[u]=M;
	E[M]=v;
}
void insert( int u, int v) {
	if(max(u, v) + 1 > all) all = max(u, v) + 1;//閾ェ蜉ィ譖エ譁ー譛?、ァ蛟シ
   
	_insert(u,v);
	_insert(v,u);
}


void argument(int u) {
	while (u != -1) {
		int v = pre[u];
		int k = match[v];
		match[u] = v;
		match[v] = u;
		u = k;
	}
}
void changeblossom(int b, int u) {
	while (base[u] != b) {
		int v = match[u];
		blossom[base[v]] = blossom[base[u]] = true;
		u = pre[v];
		if (base[u] != b) {
			pre[u] = v;
		}
	}
}
int findbase(int u, int v) {
	bool in_path[maxn] = {};
	while (true) {
		in_path[u] = true;
		if (match[u] == -1) {
			break;
		}
		u = base[pre[match[u]]];
	}
	while (!in_path[v]) {
		v = base[pre[match[v]]];
	}
	return v;
}
int contract(int u, int v) {
	memset(blossom, 0, sizeof(blossom));
	int b = findbase(base[u], base[v]);
	changeblossom(b, u);
	changeblossom(b, v);
	if (base[u] != b) {
		pre[u] = v;
	}
	if (base[v] != b) {
		pre[v] = u;
	}
	return b;
}
int bfs(int p) {
	memset(pre, -1, sizeof(pre));
	memset(ha, 0, sizeof(ha));
	for (int i = 0; i <= all; ++i) {
		base[i] = i;
	}
	que[0] = p;
	ha[p] = 1;
	for (int s = 0, t = 1; s < t; ++s) {
		int u = que[s],v;
		for(int e=first[u]; e!=-1; e=nxt[e])
		{
			v=E[e];
			if ( base[u] != base[v] && v != match[u]) {
				if (v == p || (match[v] != -1 && pre[match[v]] != -1)) {
					int b = contract(u, v);
					for (int i = 0; i <= all; ++i) {
						if (blossom[base[i]]) {
							base[i] = b;
							if (ha[i] == 0) {
								ha[i] = 1;
								que[t++] = i;
							}
						}
					}
				} else if (pre[v] == -1) {
					pre[v] = u;
					if (match[v] == -1) {
						argument(v);
						return 1;
					} else {
						que[t++] = match[v];
						ha[match[v]] = 1;
					}
				}
			}
		}
	}
	return 0;
}

int max_match() {//霑泌屓譛?、ァ蛹ケ驟肴焚逶ョ
	memset(match, -1, sizeof(match));
	int ans = 0;
	for (int i = 0; i <= all; ++i) {
		if (match[i] == -1) {
			ans += bfs(i);
		}
	}
	return ans;
}
/*************荳?握蝗セ蛹ケ驟肴ィ。譚ソ**********************/

struct node
{
	int x,y;
	node(){}
	node(int aa,int bb){x=aa; y=bb;}
}vc[maxn];
int l;
int ok(node a,node b)
{
	int w=(int)fabs(a.x-b.x)+(int)fabs(a.y-b.y);
	return w<=l;
}
int main ()
{
	int i,j;
	//freopen("in.txt","r",stdin);
	int g[40][40],id=0;;
	for(i=0; i<=30; i++)
	for(j=0; j<=30;j++)
		g[i][j]=id++;
	
	int n, a, b;
	
	while(scanf("%d", &n)!=EOF)
	{
	/*************荳?握蝗セ蛹ケ驟肴ィ。譚ソ**********************/
		init();
	/*************荳?握蝗セ蛹ケ驟肴ィ。譚ソ**********************/
		for(i=0; i<n; i++)
		{
			scanf("%d%d", &a, &b);
			vc[i]=node(a,b);
		}
		scanf("%d",&l);
		for(i=0; i<n; i++)
		{
			for(j=0; j<i; j++)
			if(ok(vc[i],vc[j]))
			{
			/*************荳?握蝗セ蛹ケ驟肴ィ。譚ソ**********************/
				insert(g[vc[i].x][vc[i].y],g[vc[j].x][vc[j].y]);
			/*************荳?握蝗セ蛹ケ驟肴ィ。譚ソ**********************/
			}
		}
		/*************荳?握蝗セ蛹ケ驟肴ィ。譚ソ**********************/
		int ans = max_match();
		/*************荳?握蝗セ蛹ケ驟肴ィ。譚ソ**********************/
		if( ans * 2 == n) puts("YES");
			else puts("NO");
	}
		return 0;
}