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;

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>

using namespace std;

int f[21][21];

int main() {
  int n;
  while (cin >> n, n) {
    memset(f, 0, sizeof(f));

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

    int x=10, y=10;
    int cnt = 0;

    int m;
    cin >> m;
    for (int i=0; i<m; i++) {
      char dir;
      int step;
      cin >> dir >> step;
      while (step--) {
        if (dir == 'N') { y++; }
        else if (dir == 'S') { y--; }
        else if (dir == 'E') { x++; }
        else { x--; }

        if (f[y][x]) {
          f[y][x] = 0;
          cnt++;
        }
      }
    }

    if (cnt == n) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  }

  return 0;
}

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

using namespace std;

int main(){
	int N;
	int M;
	char dist;
	int cnt=0;
	
	while(1){
		int x2=10,y2=10;
		cin>>N;
		if(!N)	break;


		bool houseki[21][21]={};
		int x=0,y=0;
		for(int i=0;i<N;i++){
			cin>>x>>y;
			houseki[x][y]=true;
		}	
		cin>>M;

		for(int j=0;j<M;j++){
			int kyori;
			cin>>dist>>kyori;
			for(int k=0;k<kyori;k++){
				switch (dist)
				{
				case 'N':
					y2++;
					break;
				case 'E':
					x2++;
					break;
				case 'S':
					y2--;
					break;
				case 'W':
					x2--;
					break;
				}
				if(houseki[x2][y2]){
					cnt++;
					houseki[x2][y2]=false;
				}
			}
		}

		cout<<(N==cnt?"Yes":"No")<<endl;
	}
	return 0;
}

C++: #include<map>
#include<set>
#include<list>
#include<cmath>
#include<queue>
#include<stack>
#include<cstdio>
#include<string>
#include<vector>
#include<complex>
#include<cstdlib>
#include<cstring>
#include<climits>
#include<numeric>
#include<sstream>
#include<iostream>
#include<algorithm>
#include<functional>

#define MP make_pair
#define PB push_back
#define ALL(x) (x).begin(),(x).end()
#define REP(i,n) for(int i=0;i<(n);i++)
#define REP1(i,n) for(int i=1;i<(n);i++)
#define REP2(i,d,n) for(int i=(d);i<(n);i++)
#define RREP(i,n) for(int i=(n);i>=0;i--)

using namespace std;

int main(){
    int n;
    while(cin >> n,n){

        int houseki[20][20]={0};
        int a,b;
        REP(i,n){
            cin >> a >> b;
            houseki[a][b] = 1;
        }

        int m;
        cin >> m;
        int cnt = 0;
        char s;
        int l;
        int x = 10,y = 10;
        REP(i,m){
            cin >> s;
            cin >> l;
            switch (s) {
                case 'N':
                    while(l != 0){
                        if(houseki[x][y+1] == 1){
                            cnt++;
                        }
                        l--;
                        y++;
                    }
                    break;
                case 'E':
                    while(l != 0){
                        if(houseki[x+1][y] == 1){
                            cnt++;
                        }
                        l--;
                        x++;
                    }
                    break;
                case 'S':
                    while(l != 0){
                        if(houseki[x][y-1] == 1){
                            cnt++;
                        }
                        l--;
                        y--;
                    }
                    break;
                case 'W':
                    while(l != 0){
                        if(houseki[x-1][y] == 1){
                            cnt++;
                        }
                        l--;
                        x--;
                    }
                    break;
                }
        }
        if(n == cnt){
            cout << "Yes" << endl;
        }else{
            cout << "No" << endl;
        }
    }
    return 0;
}