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++: //#define _GRIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;

// ?????¬???????????¬??????
#pragma region MACRO
#define P(x) cout << (x) << endl
#define p(x) cout << (x)
#define PED cout << "\n"
#define rep(i,n) for(int i=0; i<(int)n; ++i)
#define REP(i,x,n) for(int i=x; i<(int)n; ++i)
#define repi(i,n) for(int i=0; i<=(int)n; ++i)
#define REPI(i,x,n) for(int i=x; i<=(int)n; ++i)
#define ILP while(true)
#define FOR(i,c) for(__typeof((c).begin())!=(c).begin(); i!=(c).end(); ++i)
#define ALL(c) (c).begin(), (c).end()
#define mp make_pair
#pragma endregion

// ???
#pragma region TYPE_DEF
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<string, string> pss;
typedef pair<string, int> psi;
typedef pair<int, string> pis;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<long double> vld;
typedef vector<long> vl;
typedef vector<long long> vll;
typedef vector<string> vs;
#pragma endregion

// Effective std
#pragma region ESTD
template<typename C, typename T> int count(C& c, T t) { return count(ALL(c), t); }
template<typename C, typename F> int count_if(C& c, F f) { return count_if(ALL(c), f); }
template<typename C, typename T> void erase(C& c, T t) { remove(ALL(c), t), c.end(); }
template<typename C> void remove(vector<C>& c, unsigned int index) { c.erase(c.begin()+index); }
template<typename C, typename T, typename U> void replace(C& c, T t, U u) { replace(ALL(c), t, u); }
template<typename C, typename F, typename U> void replace_if(C& c, F f, U u) { (ALL(c), f, u); }
template<typename C> void reverse(C& c) { reverse(ALL(c)); }
template<typename C> void sort(C& c) { sort(ALL(c)); }
template<typename C, typename Pred> void sort(C& c, Pred p) { sort(ALL(c), p); }
#pragma endregion

// ?????°
#pragma region CONST_VAL
constexpr int PI = (2*acos(0.0));
constexpr int EPS = (1e-9);
constexpr int MOD = (int)(1e9+7);
constexpr int INF = 100000000;
#pragma endregion

int field[21][21];

int main()
{
    int n;
    while(cin>>n, n) {
        memset(field, 0, sizeof(field));
        rep(i,n) {
            int x, y;
            cin >> x >> y;
            field[x][y] = 1;
        }
        int m;
        cin >> m;
        int x = 10, y = 10;
        rep(i, m) {
            char dir;
            int dist;
            cin >> dir >> dist;
            if(dir=='N') {
                rep(i,dist) {
                    y += 1;
                    field[x][y] = 0;
                }
            }
            else if(dir=='S') {
                rep(i,dist) {
                    y-=1;
                    field[x][y] = 0;
                }
            }
            else if(dir=='E') {
                rep(i,dist) {
                    x+=1;
                    field[x][y] = 0;
                }
            }
            else if(dir=='W') {
                rep(i,dist) {
                    x-=1;
                    field[x][y] = 0;
                }
            }
        }

        string ans = "Yes";
        rep(i,21) {
            rep(j,21)
                if(field[i][j]==1) {
                    ans = "No";
                    break;
                }
        }
        P(ans);
    }
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main(int argc, char const *argv[])
{
	int n;
	while(cin>>n,n)
	{
		bool a[21][21]={};
		int x,y;
		for (int i = 0; i < n; ++i) cin>>x>>y,a[x][y]=1;
		int m;
		cin>>m;
		int nx=10,ny=10,r;
		char c;
		for (int i = 0; i < m; ++i)
		{
			cin>>c>>r;
			if(c=='N') for (int i = 1; i <= r; ++i) if(a[nx][ny+i]) a[nx][ny+i]=0,--n;
			else if(c=='E') for (int i = 1; i <= r; ++i) if(a[nx+i][ny]) a[nx+i][ny]=0,--n;
			else if(c=='W') for (int i = 1; i <= r; ++i) if(a[nx-i][ny]) a[nx-i][ny]=0,--n;
			else for (int i = 1; i <= r; ++i) if(a[nx][ny-i]) a[nx][ny-i]=0,--n;
		}
		cout<<((n==0)?"No\n":"Yes\n");
	}
	return 0;
}

C++: //#include<cstdio>
//#include<iostream>
//
//#include<algorithm>
//#include<cstdlib>
//#include<queue>
//#include<stack>
#include<iostream>
#include<vector>
#include<stdlib.h>
#include<iomanip>
using namespace std;

int pos[22][22];
int main(){
    while(true){
        int N;
        cin>>N;
        if(N==0)
            break;
        memset (pos,0,sizeof(pos));
        for(int i=0;i<N;i++){
            int x,y;
            cin>>x>>y;
            pos[20-y][x]=1;
        }
        int M;
        cin>>M;
        int x=10,y=10;
        for(int i=0;i<M;i++){
            char d;
            int l;
            cin>>d>>l;
            switch(d){
                case'N':
                    for(int i=0;i<=l;i++){
                        pos[y-i][x]=0;
                    }
                    y-=l;
                    break;
                case'S':
                    for(int i=0;i<=l;i++){
                        pos[y+i][x]=0;
                    }
                    y+=l;
                    break;
                case'W':
                    for(int i=0;i<=l;i++){
                        pos[y][x-i]=0;
                    }
                    x-=l;
                    break;
                case'E':
                    for(int i=0;i<=l;i++){
                        pos[y][x+i]=0;
                    }
                    x+=l;
                    break;
            }
            //cout<<x<<"    "<<y<<endl;
        }
        int a=1;
        
        for(int i=0;i<=20;i++){
//            cout<<setw(2) << setfill('.')<<20-i<<": ";
           for(int j=0;j<=20;j++){
//                cout<<setw(2) << setfill('.')<<pos[i][j];
                if(pos[i][j]==1)
                    a=0;
            }
//            cout<<endl;
        }
//        cout<<"    ";
//        for(int i=0;i<=20;i++)
//            cout<<setw(2) << setfill('.')<<i;
//        cout<<endl;
        cout<<(a==1?"Yes":"No")<<endl;
    }
}