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 INF_LL (int64)1e18
#define INF (int32)1e9
#define REP(i, n) for(int i = 0;i < (n);i++)
#define FOR(i, a, b) for(int i = (a);i < (b);i++)
#define all(x) x.begin(),x.end()
#define fs first
#define sc second

using int32 = int_fast32_t;
using uint32 = uint_fast32_t;
using int64 = int_fast64_t;
using uint64 = uint_fast64_t;
using PII = pair<int32, int32>;
using PLL = pair<int64, int64>;

const double eps = 1e-6;

template<typename A, typename B>inline void chmin(A &a, B b){if(a > b) a = b;}
template<typename A, typename B>inline void chmax(A &a, B b){if(a < b) a = b;}

const int64 mod = 1e9+7;

int32 dx[4] = {-1, 1, 0, 0};
int32 dy[4] = {0, 0, 1, -1};
int32 dir[1000] = {};

int main(void){
	int32 n, r;
	dir['N']=2; dir['E']=1; dir['W']=0; dir['S'] = 3;
	while(cin >> n && n){
		int32 cnt = n;
		bool f[30][30] = {};
		int32 y = 10, x = 10;
		REP(i, n){
			int32 a, b;
			cin >> a >> b;
			f[b][a] = 1;
			if(a == 10 && b == 10){
				f[b][a] = 0; cnt--;
			}
		}
		int32 q;
		cin >> q;
		REP(i, q){
			char c; int32 dis;
			cin >> c >> dis;
			REP(j, dis){
				y = y+dy[dir[c]]; x = x+dx[dir[c]];
				if(f[y][x]){
					f[y][x] = 0; cnt--;
				}
			}
		}
		cout << (cnt ? "No" : "Yes") << endl;
	}
}

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

using namespace std;

bool map[21][21];

int main() {
    while (1) {
        int n;
        cin >> n;
        if (n == 0) break;

        memset(map, 0, sizeof(map));

        for (int i = 0; i < n; ++i) {
            int x, y;
            cin >> x >> y;
            map[x][y] = true;
        }

        int m;
        cin >> m;
        int x = 10;
        int y = 10;
        int cnt = 0;
        if (map[10][10]) {
            map[10][10] = false;
            cnt++;
        }

        for (int i = 0; i < m; ++i) {
            char dir;
            int dist;
            cin >> dir >> dist;
            int dx = 0;
            int dy = 0;
            switch(dir) {
                case 'N':
                    dy = 1;
                break;
                case 'S':
                    dy = -1;
                break;
                case 'E':
                    dx = 1;
                break;
                case 'W':
                    dx = -1;
                break;
            }

            for (int k = 0; k < dist; ++k) {
                x += dx;
                y += dy;
                if (map[x][y]) {
                    map[x][y] = false;
                    cnt++;
                }
            }
        }

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

C++: #include <iostream>
#include <complex>
#include <vector>
#include <string>
using namespace std;

int dx[] = {0,0,1,-1};
int dy[] = {1,-1,0,0};

int main(){
	int n, m, xi, yi, a;
	char c, f[256];
	f['N'] = 0;
	f['S'] = 1;
	f['E'] = 2;
	f['W'] = 3;
	
	while( cin >> n , n ){
		vector< complex<int> > vc;
		char field[21][21] = {0};
		int x = 10;
		int y = 10;
		
		for(int i=0 ; i < n ; i++ ){
			cin >> xi >> yi;
			field[yi][xi] = 1;
		}
		cin >> m;
		for(int i=0 ; i < m ; i++ ){
			cin >> c >> a;
			for( ; a-- ; ){
				x += dx[ f[c] ];
				y += dy[ f[c] ];
				if( field[y][x] == 1 ){
					n--;
					field[y][x] = 0;
				}
			}
		}
		cout << ( ( n == 0 )? "Yes" : "No" ) << endl;
	}
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int n;
bool tbl[30][30];
int dx[200],dy[200];
int main(){
  dy['N'] = 1;
  dy['S'] = -1;
  dx['W'] = -1;
  dx['E'] = 1;
  
  while(cin>>n,n){
    for(int i=0;i<30;++i) for(int j=0;j<30;++j) tbl[i][j] = false;
    for(int i=0;i<n;++i){
      int x,y;
      cin >> x >> y;
      tbl[y][x]=true;
    }

    int m;cin>>m;
    int x=10,y=10;
    int cnt = 0;
    while(m--){
      int d;char c;
      cin >> c >> d;
      for(int i=0;i<d;++i){
	cnt+=tbl[y][x];
	tbl[y][x]=false;
	x +=dx[c];
	y +=dy[c];
      }
    }
    cnt+=tbl[y][x];
    if(cnt==n) cout << "Yes" << endl;
    else cout << "No" << endl;
  }
  return 0;
}

C++: #include <stdio.h>
#include <cmath>
#include <iostream>

using namespace std;

int main() {
	int k;
	char d;
	int a,b;
	int counter;
	int robx;
	int roby;
	int kari;
	while (cin >> k) {
		if (k == 0) {
			break;
		}
		counter = 0;
		int hyou[21][21] = {0};
		int koudou[30][2] = {0};
		for (int i = 0; i < k; i++) {
			cin >> a >> b;
			hyou[a][b] = 1;
			counter++;
		}
		cin >> k;
		for (int i = 0; i < k; i++) {
			cin >> d >> a;
			if (d == 'N') {
				koudou[i][0] = a;
			} else if (d == 'S') {
				koudou[i][0] = -a;
			} else if (d == 'E') {
				koudou[i][1] = a;
			} else {
				koudou[i][1] = -a;
			}
		}
		robx = 10;
		roby = 10;
		if (hyou[10][10] == 1) {
			hyou[10][10] = 0;
			counter--;
		}
		for (int i = 0; i < k; i++) {
			if (koudou[i][0] == 0) {
				kari = 1;
			} else {
				kari = 0;
			}
			for (int j = 0; j < abs(koudou[i][kari]); j++) {
				if (koudou[i][kari] > 0) {
					if (kari == 0) {
						roby++;
					} else {
						robx++;
					}
				} else {
					if (kari == 0) {
						roby--;
					} else {
						robx--;
					}
				}
				//printf("%d %d\n",robx,roby);
				if (hyou[robx][roby] == 1) {
					hyou[robx][roby] = 0;
					counter--;
				}
			}
		}
		if (counter == 0) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}
	return 0;
}