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>

using namespace std;

int main(){
	int N, x[30], y[30], M, distance[30], placex, placey;
	char move[30];
	while(1){
		cin >> N;
		if(N == 0) break;

		int placex = 10, placey = 10, count = 0;

		for(int i = 1;i <= N;i++){
			cin >> x[i] >> y[i];
		}

		cin >> M;
		for(int i = 0;i < M;i++){
			cin >> move[i] >> distance[i];
		}

		for(int i = 0;i < M;i++){
			if(move[i] == 'N'){
				for(int j = 0;j < distance[i];j++){
					placey++;
					for(int k = 1;k <= 20;k++){
						for(int s = 1;s <= 20;s++){
							if(placex == x[s] && placey == y[k]){
								count++;
								x[s] = -1;
								y[k] = -1;
							}
						}
					}
				}
			} else if (move[i] == 'E'){
				for(int j = 0;j < distance[i];j++){
					placex++;
					for(int k = 1;k <= 20;k++){
						for(int s = 1;s <= 20;s++){
							if(placex == x[s] && placey == y[k]){
								count++;
								x[s] = -1;
								y[k] = -1;
							}
						}
					}
				}
			} else if (move[i] == 'W'){
				for(int j = 0;j < distance[i];j++){
					placex--;
					for(int k = 1;k <= 20;k++){
						for(int s = 1;s <= 20;s++){
							if(placex == x[s] && placey == y[k]){
								count++;
								x[s] = -1;
								y[k] = -1;
							}
						}
					}
				}
			} else {
				for(int j = 0;j < distance[i];j++){
					placey--;
					for(int k = 1;k <= 20;k++){
						for(int s = 1;s <= 20;s++){
							if(placex == x[s] && placey == y[k]){
								count++;
								x[s] = -1;
								y[k] = -1;
							}
						}
					}
				}
			}
		}
		if(count == N){
			cout << "Yes" << endl;
		} else {
			cout << "No" << endl;
		}
	}

	return 0;
}

C++: 
#include<iostream>
using namespace std;
int main() {
	int a[20][20] = {};
	int n;
	while (cin >> n&&n!=0) {
		for (int i = 0; i < n; i++) {
			int x, y;
			cin >> x >> y;
			a[x][y] = 1;
		}
		int m;
		int x = 10, y = 10;
		int count = 0;
		for (cin >> m; m > 0; m--) {
			int num;
			char c;
			cin >> c >> num;
			switch (c) {
			case('N'):
				for (int i = 0; i < num; i++) {
					y += 1;
					if (a[x][y]) {
						count++;
						a[x][y] = 0;
					}
				}
				break;
			case('E'):
				for (int i = 0; i < num; i++) {
					x += 1;
					if (a[x][y]) {
						count++;
						a[x][y] = 0;
					}
				}
				break;
			case('S'):
				for (int i = 0; i < num; i++) {
					y -= 1;
					if (a[x][y]) {
						count++;
						a[x][y] = 0;
					}
				}
				break;
			case('W'):
				for (int i = 0; i < num; i++) {
					x -= 1;
					if (a[x][y]) {
						count++;
						a[x][y] = 0;
					}
				}
				break;
			}
		}
		if (count == n)cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <map>
using namespace std;

int main(){
  while(1){
    int N=0;
    cin >> N;
    if(N==0)break;
    int m[20][20]={0};
    for(int i=0;i<N;i++){
      int x,y;
      cin >> x >> y;
      m[x-1][y-1]=1;
    }
    int M;
    cin >> M;
    map<char,pair<int,int> > mp;
    mp['N'].first=0;
    mp['N'].second=1;
    mp['E'].first=1;
    mp['E'].second=0;
    mp['S'].first=0;
    mp['S'].second=-1;
    mp['W'].first=-1;
    mp['W'].second=0;
    int count=0;
    int nx=9,ny=9;
    if(m[nx][ny]==1){
      count++;
      m[nx][ny]=0;
    }
    for(int i=0;i<M;i++){
      char Q;
      int D;
      cin >> Q >> D;
      for(int j=0;j<D;j++){
        nx+=mp[Q].first;
        ny+=mp[Q].second;
        if(m[nx][ny]==1){
          count+=m[nx][ny];
          m[nx][ny]=0;
        }
      }
    }
    if(count==N){
      cout << "Yes";
    }else{
      cout << "No";
    }
    cout << endl;
  }
}

C++: #include<iostream>
#include<string>
using namespace std;
int main(){
	int N;
	while(cin>>N){
		if(N==0)break;
		int da[30][30]={};
		for(int i=0;i<N;i++){
			int x,y;
			cin>>x>>y;
			da[y][x]=1;
		}
		int M;
		cin>>M;
		int dx=10,dy=10;
		for(int i=0;i<M;i++){
			char d;
			int l;
			cin>>d;
			cin>>l;
			if(d=='N'){
				for(int i=1;i<=l;i++){
					dy++;
					da[dy][dx]=0;
				}
			}
			if(d=='E'){
				for(int i=1;i<=l;i++){
					dx++;
					da[dy][dx]=0;
				}
			}
			if(d=='W'){
				for(int i=1;i<=l;i++){
					dx--;
					da[dy][dx]=0;
				}
			}
			if(d=='S'){
				for(int i=1;i<=l;i++){
					dy--;
					da[dy][dx]=0;
				}
			}

		}
		string s="Yes";
		for(int i=0;i<22;i++){
			for(int j=0;j<22;j++){
				if(da[i][j]==1){
					s="No";
					break;
				}
			}
		}
		cout<<s<<endl;
	}
	return 0;
}