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 <bits/stdc++.h>
using namespace std;
#define int long long   // <-----!!!!!!!!!!!!!!!!!!!

#define rep(i,n) for (int i=0;i<(n);i++)
#define rep2(i,a,b) for (int i=(a);i<(b);i++)
#define rrep(i,n) for (int i=(n)-1;i>=0;i--)
#define rrep2(i,a,b) for (int i=(a)-1;i>=b;i--)
#define chmin(a,b) (a)=min((a),(b));
#define chmax(a,b) (a)=max((a),(b));
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define printV(v) cerr<<(#v)<<":";for(auto(x):(v)){cerr<<" "<<(x);}cerr<<endl;
#define printVS(vs) cerr<<(#vs)<<":"<<endl;for(auto(s):(vs)){cerr<<(s)<< endl;}
#define printVV(vv) cerr<<(#vv)<<":"<<endl;for(auto(v):(vv)){for(auto(x):(v)){cerr<<" "<<(x);}cerr<<endl;}
#define printP(p) cerr<<(#p)<<(p).first<<" "<<(p).second<<endl;
#define printVP(vp) cerr<<(#vp)<<":"<<endl;for(auto(p):(vp)){cerr<<(p).first<<" "<<(p).second<<endl;}

inline void output(){ cerr << endl; }
template<typename First, typename... Rest>
inline void output(const First& first, const Rest&... rest) {
    cerr << first << " "; output(rest...);
}

using ll = long long;
using Pii = pair<int, int>;
using TUPLE = tuple<int, int, int>;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
const int inf = 1ll << 60;
const int mod = 1e9 + 7;
using Graph = vector<vector<int>>;

// N, E, S, W
const int dx[4] = {-1, 0,  1,  0};
const int dy[4] = { 0, 1,  0, -1};

int chr2int(char c) {
    if (c == 'W') return 0;
    if (c == 'N') return 1;
    if (c == 'E') return 2;
    return 3;
}

signed main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);

    int n;
    while (cin >> n, n) {
        vector<Pii> vp(n);
        rep(i, n) cin >> vp[i].first >> vp[i].second;
        int m;
        cin >> m;
        vector<vector<bool>> visited(21, vector<bool>(21));
        int x = 10, y = 10;
        visited[x][y] = true;
        rep(i, m) {
            char c;
            int l;
            cin >> c >> l;
            int d = chr2int(c);
            while (l--) {
                x += dx[d];
                y += dy[d];
                visited[x][y] = true;
            }
        }

        int cnt = 0;
        rep(i, n) {
            cnt += visited[vp[i].first][vp[i].second];
        }

        cout << (cnt == n ? "Yes" : "No") << endl;


    }
}

C++: #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstring>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <tuple>
#include <vector>
using namespace std;
typedef long long ll;
#define _ << " " <<
#define all(X) (X).begin(), (X).end()
#define Pii pair<int, int>
#define Pll pair<ll, ll>
#define Ti4 tuple<int, int, int, int>
#define Tlll tuple<ll, ll, ll>
#define PI 3.141592653589793

int main() {
    int n;
    while (cin >> n) {
        if (n == 0) return 0;
        
        bool jew[21][21] = {};
        for (int i = 0; i < n; i++) {
            int x, y;  cin >> x >> y;
            jew[x][y] = 1;
        }
        int m, d[35];
        char c[35];
        cin >> m;
        for (int i = 0; i < m; i++) {
            cin >> c[i] >> d[i];
        }

        bool yes = 0;
        bool jew2[21][21] = {};
        int tx = 10, ty = 10, cnt = 0;
        if (jew[tx][ty] && !jew2[tx][ty]) {
            jew2[tx][ty] = 1;
            cnt++;
        }
        for (int i = 0; i < m; i++) {
            int dx = 0, dy = 0;
            bool ok = 1;
            if (c[i] == 'N') dy = 1;
            if (c[i] == 'E') dx = 1;
            if (c[i] == 'W') dx = -1;
            if (c[i] == 'S') dy = -1;

            for (int j = 0; j < d[i]; j++) {
                tx += dx;  ty += dy;
                if (jew[tx][ty] && !jew2[tx][ty]) {
                    jew2[tx][ty] = 1;
                    cnt++;
                }
            }
        }
        cout << (cnt == n ? "Yes" : "No") << endl;
    }
}

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

int main() {
	int N, M;
	while( cin >> N, N ) {
		vector<vector<bool>>d( 21, vector<bool>( 21 ) );
		for( size_t i = 0; i < N; i++ ) {
			int a, b;
			cin >> a >> b;
			d[a][b] = 1;
		}
		cin >> M;
		int nowx = 10, nowy = 10;
		for( size_t i = 0; i < M; i++ ) {
			char c;
			cin >> c;
			int p;
			cin >> p;
			int nextx = 0, nexty = 0;
			switch( c ) {
			case 'N':
			{
				nexty++;
				break;
			}
			case 'S':
			{
				nexty--;
				break;
			}
			case 'E':
			{
				nextx++;
				break;
			}
			case 'W':
			{
				nextx--;
				break;
			}
			}
			for( size_t i = 0; i < p; i++ ) {
				nowx += nextx;
				nowy += nexty;
				if( d[nowx][nowy] ) {
					N--;
					d[nowx][nowy] = 0;
				}
			}
		}
		cout << (N == 0 ? "Yes" : "No") << endl;
	}
}

C++: #include <iostream>
using namespace std;
int main(){
	int N;	
	while(cin >> N, N){
		int m[21][21] = {0};
		for(int i = 0; i < N; ++i){
			int x, y; 
			cin >> x >> y;
			++m[x][y];	
		}
		int px = 10, py = 10;
		int M;
		cin >> M;
		int ans = m[px][py];
		for(int i = 0; i < M; ++i){
			char d; int l;
			cin >> d >> l;
			int dx = d == 'E' ? 1 : d == 'W' ? -1 : 0;
			int dy = d == 'N' ? 1 : d == 'S' ? -1 : 0;
			for(int j = 0; j < l; ++j){
				px += dx, py += dy;
				ans += m[px][py];
				m[px][py] = 0;	
			}
		}
		if (ans == N) cout << "Yes" << endl;
		else cout << ans << endl;
	}
}