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>
#include<vector>
#include<complex>
#include<algorithm>

using namespace std;

typedef complex<int> C;

int main() {
    int n, x, y, m, l;
    char d;
    C pos;
    vector<C> jewels;
    while (true) {
        jewels.clear();
        pos = C(10, 10);
        cin >> n;
        if (n == 0) {
            break;
        }
        for (int i=0; i<n; i++) {
            cin >> x >> y;
            jewels.push_back(C(x, y));
        }
        cin >> m;
        for (int i=0; i<m; i++) {
            cin >> d >> l;
            for (int j=0; j<l; j++) {
                switch (d) {
                    case 'N':
                        pos += C(0, 1);
                        break;
                    case 'E':
                        pos += C(1, 0);
                        break;
                    case 'W':
                        pos += C(-1, 0);
                        break;
                    case 'S':
                        pos += C(0, -1);
                        break;
                }
                for (vector<C>::iterator iter=jewels.begin(); iter!=jewels.end();) {
                    if (*iter == pos) {
                        jewels.erase(iter);
                    }
                    else {
                        iter++;
                    }
                }
            }
        }
        if (jewels.empty()) {
            cout << "Yes" << endl;
        }
        else {
            cout << "No" << endl;
        }
    }
    return 0;
}

C++: #include <iostream>
#include <vector>
#include <map>
#define F(a, b) for (int j = a; j < b; j++)
using namespace std;
typedef pair<int, int> mypair;
int main(void)
{
	int n, m;
	while (1)
	{
		cin >> n;
		if (n == 0)
			break;
		vector<vector<int> > t(21, vector<int>(21, 0));
		mypair p;
		int c = 0;
		int x, y;
		for (int i = 0; i < n; i++)
		{
			cin >> x >> y;
			t[x][y] = 1;
		}
		//mypair now(10, 10);
		mypair now;
		now.first＝10;
		now.second=10;
		cin >> m;
		char a;
		for (int i = 0; i < m; i++)
		{
			cin >> a >> x;
			if (a == 'N')
			{
				F(0, x)
				{
					now.second++;
					if (t[now.first][now.second] == 1)
					{
						c++;
						t[now.first][now.second] = 0;
					}
				}
				
			}
			else if (a == 'W')
			{
			
				F(0,x)
				{
					now.first--;
					if (t[now.first][now.second] == 1)
					{
						c++;
						t[now.first][now.second] = 0;
					}
				}
				
			}
			else if (a == 'E')
			{
				F(0,x)
				{	
					now.first++;
					if (t[now.first][now.second] == 1)
					{
						c++;
						t[now.first][now.second] == 0;
					}
				}
				
			}
			else
			{
				F(0,x)
				{
					now.second--;
					if (t[now.first][now.second]==1)
					{
						c++;
						t[now.first][now.second] == 0;
					}
				}
				
			}
		}
		if (c == n)
		{
			cout << "Yes" << endl;
		}
		else
		{
			cout << "No" << endl;
		}
	}
	return 0;
}

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

int main(){
  int map[21][21];
  int dx,dy;
  int get;
  int N,M;
  int x,y;
  int len;
  int i,j;

  string A;

  while(1){
    get = 0;
    dx = 10;
    dy = 10;
    for(i = 0 ; i < 21 ; i++){
      for(j = 0 ; j < 21 ; j++){
	map[i][j]=0;
      }
    }
    cin >> N;
    if(N==0) break;
    for(i = 0 ; i < N ; i++){
      cin >> x >> y;
      map[x][y]=1;
    }
 
    cin >> M;
    for(i = 0 ; i < M ; i++){
      cin >> A >> len;
      if(A == "N"){
	for(j = 0 ; j < len ; j++){
	  dy++;
	  if(map[dx][dy]==1){
	    map[dx][dy]==0;
	    get++;
	  }
	}
      }

      if(A == "E"){
	for(j = 0 ; j < len ; j++){
	  dx++;
	  if(map[dx][dy]==1){
	    map[dx][dy]==0;
	    get++;
	  }
	}
      }
      if(A == "S"){
	for(j = 0 ; j < len ; j++){
	  dy--;
	  if(map[dx][dy]==1){
	    map[dx][dy]==0;
	    get++;
	  }
	}
      }

      if(A == "W"){
	for(j = 0 ; j < len ; j++){
	  dx--;
	  if(map[dx][dy]==1){
	    map[dx][dy]==0;
	    get++;
	  }
	}
      }

    }

    if(N == get){
      cout << "Yes" << endl;
    }else{
      cout << "No" << endl;
    }
  }

  return 0;
}

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

C++: #include<iostream>
using namespace std;
int main()
{
  int n, m, a[21], b[21], d[31];
  int x, y, x0, y0;
  int t = 0;
  char c[31];

  while(1){
    cin >> n;
    if(n==0){
       break;
    }else{
    for(int i=0; i<n; i++){
      cin >> a[i] >> b[i];
    }

    cin >> m;
    for(int i=0; i<m; i++){
      cin >> c[i] >> d[i];
      switch(c[i]){
        case 'N':
          y += d[i];
          break;
        case 'S':
          y -= d[i];
          break;
        case 'E':
          x += d[i];
          break;
        case 'W':
          x -= d[i];
          break;
      }

      for(int j=0; j<n; j++){
        if(((x0<=a[j] && a[j]<=x) || (x<=a[j] && a[j]<=x0)) && ((y0<=b[j] && b[j]<=y) ||
        (y<=b[j] && b[j]<=y0))){
          t++;
        }
      }
      x0 = x;
      y0 = y;
    }
    if(t>=n){
      cout << "Yes" << endl;
    }else{
      cout << "No" << endl;
    }
      x = 10;
      y = 10;
      x0 = 10;
      y0 = 10;
  } 
  }

  return 0;
}