Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

var (
	sc = bufio.NewScanner(os.Stdin)
)

type Point struct {
	X, Y int
}

type Gem struct {
	ID int
	Point
}

type Map struct {
	Current       *Point
	Gems          map[int]*Gem
	CollectedGems map[int]*Gem
}

func (m *Map) Move(dir string, l int) {
	switch {
	case dir == "N" || dir == "S":
		a := 1
		if dir == "S" {
			a = -1
		}
		for i := 0; i < l; i++ {
			m.Current.Y += a
			for _, g := range m.Gems {
				m.TryToTakeGem(g)
			}
		}
	case dir == "E" || dir == "W":
		a := 1
		if dir == "W" {
			a = -1
		}
		for i := 0; i < l; i++ {
			m.Current.X += a
			for _, g := range m.Gems {
				m.TryToTakeGem(g)
			}
		}
	}
}

func (m *Map) HasCompleted() bool {
	return len(m.Gems) == 0
}

func (m *Map) TryToTakeGem(g *Gem) {
	if m.Current.X == g.X && m.Current.Y == g.Y {
		m.CollectedGems[g.ID] = g
		delete(m.Gems, g.ID)
	}
}

func main() {
	for sc.Scan() {
		n, _ := strconv.Atoi(sc.Text())
		if n == 0 {
			break
		}
		m := &Map{
			Current:       &Point{X: 10, Y: 10},
			Gems:          map[int]*Gem{},
			CollectedGems: map[int]*Gem{},
		}
		for i := 0; i < n; i++ {
			sc.Scan()
			chunks := strings.Split(sc.Text(), " ")
			x, _ := strconv.Atoi(chunks[0])
			y, _ := strconv.Atoi(chunks[1])
			m.Gems[i+1] = &Gem{ID: i + 1, Point: Point{X: x, Y: y}}
		}
		sc.Scan()
		opCnt, _ := strconv.Atoi(sc.Text())
		for i := 0; i < opCnt; i++ {
			sc.Scan()
			chunks := strings.Split(sc.Text(), " ")
			dir := chunks[0]
			v, _ := strconv.Atoi(chunks[1])
			m.Move(dir, v)
		}
		msg := "No"
		if m.HasCompleted() {
			msg = "Yes"
		}
		fmt.Println(msg)
	}
}

C++: #include <iostream>
#include <algorithm>
#include <cstring>
#include <vector>

using namespace std;
int main(){
  int n;
  while(cin >> n, n!=0){
    int posx = 10,posy = 10;
    vector<int> tx,ty;
    for(int i=0;i<n;i++){
      int x,y;
      cin >> x >> y;
      tx.push_back(x);
      ty.push_back(y);
    }
    int m;
    cin >> m;
    int movex[m],movey[m];
    string c;
    int l;
    for(int i=0; i<m;i++){
      cin >> c >> l;
      if(c == "N"){
	movex[i] = 0;
	movey[i] = l;	    
      }else if(c == "E"){
	movex[i] = l;
	movey[i] = 0;
      }else if(c == "S"){
	movex[i] = 0;
	movey[i] = -1*l;
      }else if(c == "W"){
	movex[i] = -1*l;
	movey[i] = 0;
      }
      for(int j=0;j<tx.size();j++){
	if(tx[j] >= posx && tx[j] <= posx + movex[i] && ty[j] >= posy && ty[j] <=posy + movey[i]){
	  n--;
	  vector<int>::iterator del;
	  del = tx.begin()+j;
	  tx.erase(del);
	  del = ty.begin()+j;
	  ty.erase(del);
	  j--;
	}else if(tx[j] <= posx && tx[j] >= posx + movex[i] && ty[j] <= posy && ty[j] >=posy + movey[i]){
	  n--;
	  vector<int>::iterator del;
	  del = tx.begin()+j;
	  tx.erase(del);
	  del = ty.begin()+j;
	  ty.erase(del);
	  j--;
	}
      }
      posx += movex[i];
      posy += movey[i];
    }
    if(tx.size() == 0){
      cout << "Yes" <<endl;
    }else{
      cout << "No" <<endl;
    } 
  }		  
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <utility>
#include <algorithm>
#include <functional>
#include <stack>
#include <queue>
#include <deque>

#define rep(i,j,k) for(int i=j;i<k;i++)
#define INF 2*1e9
#define pb push_back
#define mp make_pair
#define Sort(v) sort(v.begin(),v.end());
#define SSort(v) sort(v.begin(),v.end(),greater<int>); 
using namespace std;
int main(void){
    vector<vector<int>> v(20,vector<int> (20,0));
    while(1){
        int n;
        int rx=10,ry=10;
        cin>>n;
        if(n==0)break;
        rep(i,0,20)rep(j,0,20)v[i][j]=0;
        rep(i,0,n){
            int x,y;
            cin>>x>>y;
            v[x][y]=1;
        }
        
        int m;
        cin>>m;
        rep(i,0,m){
            char c;
            int x;
            cin>>c>>x;
            rep(j,0,x){
                if(c=='N')ry++;
                else if(c=='E')rx++;
                else if(c=='S')ry--;
                else if(c=='W')rx--;
                v[rx][ry]=0;
            }
        }
        
        rep(i,0,20){
            rep(j,0,20){
                if(v[i][j]==1){
                    cout<<"No"<<endl;
                    goto AWAY;
                }
            }
        }
        cout<<"Yes"<<endl;
        
        AWAY:;
        
    }
}

C++: #include <bitset>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <cstring>
#include <string>
#include <sstream>
#include <algorithm>
#include <iomanip>
#include <iostream>

#define VARIABLE(x) cerr << #x << "=" << x << endl
#define BINARY(x) cerr << #x << "=" << static_cast<bitset<16> >(x) << endl;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define REP(i,m,n) for (int i=m;i<(int)(n);i++)

const int INF = 10000000;
int dx[4]={1, 0, -1, 0}, dy[4]={0, 1, 0, -1};
using namespace std;
typedef long long  ll;
typedef pair<int, int> P;

/** Problem2000 : Misterious Gems **/
int main()
{
	P now;
	map<P, bool> gems;
	int N, M, got;
	
	while (cin>>N, N) {
		now = P(10, 10);
		got=0;
		gems.clear();
		rep(i, N) {
			int x, y;
			cin >> x >> y;
			gems[P(x, y)] = true;
		}
		cin >> M;
		rep(i, M) {
			char d; int a, dx=0, dy=0;
			cin >> d >> a;
			switch (d) {
				case 'N': dy=1; break;
				case 'E': dx=1; break;
				case 'S': dy=-1; break;
				case 'W': dx=-1; break;
			}
			rep(j, a) {
				now.first += dx;
				now.second += dy;
				
				if (gems[P(now.first, now.second)])
					got++;
			}
		}
		if (got==N)
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
	}
}

C++: #include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <climits>
#include <algorithm>
#include <map>
#include <set>
#include <stack>
#include <vector>
#include <queue>
#include <bitset>
#include <string>
using namespace std;

#define REP(i,n) for(int i=0; i<n; i++)
#define RPA(i,s,e) for(int i=s; i<=e; i++)
#define RPD(i,s,e) for(int i=s; i>=e; i--)
#define PB(a) push_back(a)
#define MP(i,s) make_pair(i,s)
#define SZ(a) (int)(a).size()
#define ALL(a) (a).begin(), (a).end()
#define PRT(a) cout << (a) << endl
#define PRT2(a,b) cout << (a) << " " << (b) << endl
#define PRT3(a,b,c) cout << (a) << " " << (b) << " " << (c) << endl

typedef vector<int> VI;
typedef long long LL;
typedef pair<int,int> P;

int n, m, x, y;
string dir;
int dist;
int field[21][21];

void coding() {
	while(scanf("%d", &n)!=EOF) {
		if(n == 0) break;
		memset(field, 0, sizeof(field));
		REP(i,n) {
			scanf("%d%d", &x, &y);
			field[x][y] = 1;
		}

		int cx = 10;
		int cy = 10;
		scanf("%d", &m);
		REP(i,m) {
			cin >> dir;
			cin >> dist;
			for(int d=0; d<dist; d++) {
				if(dir == "N") {
					cy++;
				} else if(dir == "S") {
					cy--;
				} else if(dir == "E") {
					cx++;
				} else if(dir == "W") {
					cx--;
				}

				if(field[cx][cy] == 1) {
					field[cx][cy] = 0;
				}
			}
		}

		bool ok = true;
		REP(i,20) {
			REP(j,20) {
				if(field[i][j] == 1) {
					ok = false;
				}
			}
		}
		printf("%s\n", ok ? "YES" : "NO");
	}
}

// #define _LOCAL_TEST

int main() {
#ifdef _LOCAL_TEST
	clock_t startTime = clock();
	freopen("a.in", "r", stdin);
#endif

	coding();

#ifdef _LOCAL_TEST
	clock_t elapsedTime = clock() - startTime;
	cout << endl;
	cout << (elapsedTime / 1000.0) << " sec elapsed." << endl;
	cout << "This is local test" << endl;
	cout << "Do not forget to comment out _LOCAL_TEST" << endl << endl;
#endif
}