#include <cstdio>
#include <cstring>
#include <queue>
using namespace std;

bool block[6][110][110];
bool visit[110][110];

int main(){
	int w, h;
	int xs, ys, xg, yg;
	int n, c, d, x, y;
	while(scanf("%d%d%d%d%d%d%d", &w, &h, &xs, &ys, &xg, &yg, &n) == 7){
		memset(block, 0, sizeof block);
		memset(visit, 0, sizeof visit);

		for(int i = 0; i < n; ++i){
			scanf("%d%d%d%d", &c, &d, &x, &y);
			
			int dx, dy;
			if(d){ dx = 2; dy = 4; }
			else{  dy = 2; dx = 4; }

			for(int j = 0; j < dy; ++j)
			for(int k = 0; k < dx; ++k){
				block[c][y + j][x + k] = true;
			}
		}

		for(c = 5; c > 1 && !block[c][ys][xs]; --c);

		if(c){
			queue<int> q;
			q.push(ys << 16 | xs);
			visit[ys][xs] = true;
			while(!q.empty()){
				y = q.front() >> 16;
				x = q.front() & 0xffff;
				q.pop();

				for(int dy = -1; dy <= 1; ++dy)
				for(int dx = -1; dx <= 1; ++dx){
					if(block[c][y+dy][x+dx] && !visit[y+dy][x+dx]){
						visit[y+dy][x+dx] = true;
						q.push(y+dy << 16 | x+dx);
					}
				}
			}
		}

		puts(visit[yg][xg] ? "OK" : "NG");
	}
}
/*** Mysterious Gems ***/

#include <bits/stdc++.h>
using namespace std;
#define SIZE 21
#define REP(i, n) for(int i=0; i<n; ++i)

void create_map(int map[][SIZE], int n){
	int x, y;
	REP(j, SIZE){
		REP(i, SIZE){
			map[j][i]=0;
		}
	}
	REP(i, n){
		cin >> x >> y;
		map[y][x]=1;
	}
	return;
}
	
int main(){
	int N, M;
	int l;
	int map[SIZE][SIZE], flag;
	char d;
	
	cin >> N;
	while(N!=0){
		create_map(map, N);
		
		int xx=10, yy=10;
		cin >> M;
		REP(k, M){
			cin >> d >> l;
			while(l>0){
				if(d=='N') ++yy;
				else if(d=='E') ++xx;
				else if(d=='S') --yy;
				else --xx;
				
				if(map[yy][xx]) map[yy][xx]=0;
				--l;
			}
		}
		flag=0;
		REP(j, SIZE){
			REP(i, SIZE){
				if(map[j][i]){
					flag=1;
					break;
				}
			}
		}
		
		if(flag) cout << "No" << endl;
		else cout << "Yes" << endl;
		
		cin >> N;
	}
	return 0;
}