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>

bool MAP[21][21]; //(0, 0) ~ (20, 20) ????????§???????????¨?????????21*21??????
                  //?????????????????????true??????????????????false??¨??????

int main(){

  int n, x, y;

  while(std::cin >> n){

    if(n == 0) break;

    for(int i=0; i<21; i++){
      for(int j=0; j<21; j++){
        //MAP????????????
        MAP[i][j] = false;
      }
    }


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

    int m;
    int robot_x = 10, robot_y = 10; //???????????????????????????
    int num_of_get = 0; //??\?????§?????????????????°

    std::cin >> m;

    for(int i=0; i<m; i++){

      char direction;
      int distance;

      std::cin >> direction >> distance;

      for(int j=0; j<distance; j++){
        //??????:1?????????????§??????????????????¨?????????????????????????????????
        //     ????????£??????num_of_get??????????????????????????????????????????(true -> false)
        switch(direction){
          case 'E':
            robot_x++;
            break;

          case 'W':
            robot_x--;
            break;

          case 'N':
            robot_y++;
            break;

          case 'S':
            robot_y--;
            break;
        }

        if(MAP[robot_x][robot_y] == true){
          num_of_get++;
          MAP[robot_x][robot_y] = false;
        }

      }

    }

    if(num_of_get == n){
      std::cout << "Yes" << std::endl;
    }else{
      std::cout << "No" << std::endl;
    }

  }

  return 0;

}

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

int main() {
	while(true){

		vector<vector<int>> m(21);
		for(auto &mm : m){
			mm.resize(21,0);
		}
		
		int N,M;
		cin >> N;
		if(N==0)break;
		for(int i=0;i<N;i++){
			int x,y;
			cin >> x >> y;
			m[x][y]=1;
		}
		
		cin>>M;
		int x=10,y=10;
		for(int i=0;i<M;i++){
			char c;
			int d,dx=0,dy=0;
			cin >> c >> d;
			
			switch(c){
				case 'N':
					dy=1;
					break;
				case 'E':
					dx=1;
					break;
				case 'S':
					dy=-1;
					break;
				case 'W':
					dx=-1;
					break;
			}
			for(int j=0;j<d;j++){
				x+=dx;
				y+=dy;
				if(m[x][y]==1){
					m[x][y]=0;
					N--;
				}
			}
		}
		
		if(N==0){
			cout << "Yes" << endl;
		}else{
			cout << "No" << endl;
		}
		
	}
	return 0;
}

C++: #include <iostream>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
using namespace std;

int main(){
  while(1){
    int N;
    cin >> N;
    if(N==0) break;
    int x,y,map[22][22]={};
    rep(i,N){
      cin >> x >> y;
      map[y][x] = 1;
    }
    int Rx = 10,Ry = 10,tr = 0;
    int M;
    cin >> M;
    rep(i,M){
      string v;
      int d;
      cin >> v >> d;
      if(v == "N"){
	rep(j,d){ 
	  Ry++;
	  tr += map[Ry][Rx];
	}
      }
      else if(v == "E"){
	rep(j,d){ 
	  Rx++;
	  tr += map[Ry][Rx];
	}
      }
      else if(v == "S"){
	rep(j,d){ 
	  Ry--;
	  tr += map[Ry][Rx];
	}
      }
      else if(v == "W"){
	rep(j,d){ 
	  Rx--;
	  tr += map[Ry][Rx];
	}
      }
    }
    if(tr == N) cout << "Yes\n";
    else cout << "No\n";
  }
  return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define shosu(n) setprecision(n)
#define INF 999999999
using namespace std;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<char> vc;
typedef vector<bool> vb;
typedef vector<string> vs;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vb> vvb;
typedef vector<vpii> vvpii;

int main() {
  int N, M, w;
  while (cin >> N, N) {
    bool mp[25][25] = {};
    int sx = 10, sy = 10;
    rep(i, N) {
      int a, b;
      cin >> a >> b;
      mp[b][a] = 1;
    }
    cin >> M;
    char s;
    rep(i, M) {
      cin >> s >> w;
      if (s == 'N') {
        rep(j, w) {
          sy++;
          mp[sy][sx] = 0;
        }
      }
      if (s == 'S') {
        rep(j, w) {
          sy--;
          mp[sy][sx] = 0;
        }
      }
      if (s == 'E') {
        rep(j, w) {
          sx++;
          mp[sy][sx] = 0;
        }
      }
      if (s == 'W') {
        rep(j, w) {
          sx--;
          mp[sy][sx] = 0;
        }
      }
    }
    bool ans = 1;
    rep(i, 25) rep(j, 25) if (mp[i][j]) ans = 0;
    cout << (ans ? "Yes" : "No") << endl;
  }
  return 0;
}

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

bool gem[21][21];
int dx(char c)
{
  switch(c)
  {
    case 'N': case 'S': return 0;
    case 'E': return 1;
    case 'W': return -1;
  }
  return 0;
}
int dy(char c)
{
  switch(c)
  {
    case 'E': case 'W': return 0;
    case 'N': return 1;
    case 'S': return -1;
  }
  return 0;
}
int main()
{
loop:
  memset(gem, 0, sizeof gem);
  int n, m, x, y, t;
  char c;
  cin >> n;
  if(!n)
    return 0;
  for(int i = 0; i < n; i++)
  {
    cin >> x >> y;
    gem[x][y] = true;
  }
  x = 10; y = 10;
  if(gem[10][10])
  {
    gem[10][10] = false;
    n--;
  }
  cin >> m;
  for(int i = 0; i < m; i++)
  {
    cin >> c >> t;
    for(int j = 0; j < t; j++)
    {
      x += dx(c);
      y += dy(c);
      if(gem[x][y])
      {
        gem[x][y] = false;
        n--;
      }
    }
  }
  cout << (!n ? "Yes" : "No") << endl;
  goto loop;
}