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>

using namespace std;

int main(){
  int n, m, x, y, mer;
  char dim;
  cin >> n;
  vector<int> ans;
  while(n){
    vector< vector<int> > gem(21, vector<int>(21));
    for(int i = 0; i < n; i++){
      cin >> x >> y;
      gem[y][x] = 1;
    }
    cin >> m;
    int nowx = 0;
    int nowy = 0;
    for(int j = 0; j < m; j++){
      cin >> dim >> mer;
      switch (dim) {
        case 'N':{
          for(int k = 1; k <= mer; k++){
            nowy++;
            gem[nowy][nowx] = 0;
          }
          break;
        }
        case 'E':{
          for(int k = 1; k <= mer; k++){
            nowx++;
            gem[nowy][nowx] = 0;
          }
          break;
        }
        case 'S':{
          for(int k = 1; k <= mer; k++){
            nowx--;
            gem[nowy][nowx] = 0;
          }
          break;
        }
        case 'W':{
          for(int k = 1; k <= mer; k++){
            nowy--;
            gem[nowy][nowx] = 0;
          }
          break;
        }
      }
    }
    int boo = 0;
    for(int i = 0; i <= 20; i++){
      for(int j = 0; j <= 20; j++){
        if(gem[i][j])boo = 1;
      }
    }
    ans.push_back(boo);
    cin >> n;

  }
  for(int i = 0; i < (int)ans.size(); i++){
    if(!ans[i]) cout << "Yes" << endl;
    else cout << "No" << endl;
  }
}

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

using namespace std;

struct Point
{
    int x_, y_;
    Point() : x_(0), y_(0){}
    Point(const int &x, const int &y) : x_(x), y_(y){}
    Point(const Point &pt)
    {
        x_ = pt.x_;
        y_ = pt.y_;

    }
    void setPoint(const int &x, const int &y)
    {
        x_ = x;
        y_ = y;
    }

};

void updateJewelMap(bool jewel_map[21][21], Point &current_position, const char &direction, const int &step)
{
    for(int i = 0; i < step; i++)
    {
        switch(direction)
        {
        case 'N':
            current_position.y_++;
            break;
        case 'S':
            current_position.y_--;
            break;
        case 'E':
            current_position.x_++;
            break;
        case 'W':
            current_position.x_--;
            break;
        }
        jewel_map[current_position.y_][current_position.x_] = false;
    }
}

bool isGetAllJewel(const bool jewel_map[21][21], const int &width, const int &height)
{
    for(int h = 0; h < height; h++)
    {
        for(int w = 0; w < width; w++)
        {
            if(jewel_map[h][w]){ return false; }
        }
    }
    return true;
}

int main()
{
    bool jewel_map[21][21];
    Point initial_position(10, 10);

    int num_jewel = 0;
    int num_order = 0;

    while(true)
    {
        cin >> num_jewel;
        if(num_jewel == 0){ break; }

        //Initialize jewel map
        for(int h = 0; h < 21; h++)
        {
            for(int w = 0; w < 21; w++)
            {
                jewel_map[h][w] = false;
            }
        }

        //Map jewel positions
        int x, y;
        for(int i = 0; i < num_jewel; i++)
        {
            cin >> x >> y;
            jewel_map[y][x] = true;
        }

        //Set & execute orders
        cin >> num_order;
        char direction;
        int step;
        Point current_position(initial_position);
        jewel_map[current_position.y_][current_position.x_] = false;
        for(int i = 0; i < num_order; i++)
        {
            cin >> direction >> step;
            updateJewelMap(jewel_map, current_position, direction, step); //update jewel_map
        }

        if(isGetAllJewel(jewel_map, 21, 21)){ cout << "Yes" << endl; }
        else                                { cout << "No" << endl; }

    }


    return 0;
}

C++: #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>

#define ll long long
#define ull unsigned long long
#define pii pair<int,int>
#define vi vector<int>
#define VS vector<string>
#define all(x) x.begin(),x.end()
#define mp make_pair
#define pb push_back

using namespace std;

bool field[25][25];

int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
string compass = "NESW";

int main(){
    int n, m;
    while(cin >> n, n){
        int ans = 0;
        int mx=10, my=10;
        for(int i=0; i < 25; i++)for(int j=0; j < 25; j++) field[i][j] = false;

        for(int i=0; i < n; i++){
            int p, q;
            cin >> p >> q;
            field[p][q] = true;
        }
        cin >> m;
        for(int i=0; i < m; i++){
            string p; int q;
            cin >> p >> q;
            int position;
            for(int j=0; j < 4; j++) if(compass.substr(j, 1) == p) position = j;

            for(int j=1; j <= q; j++){
                if(field[my+dy[position]*j][mx+dx[position]*j]) ans++;
            }
            mx += dx[position]*q; my += dy[position]*q;
        }
        if(n == ans) cout << "Yes" << endl;
        else cout << "No" << endl;
    }
}

C++: #include <bits/stdc++.h>
#define REP(i,n,N) for(int i=n;i<N;i++)
#define MEM(a,n) memset(a,n,sizeof(a))
#define p(S) cout<<(S)<<endl
using namespace std;

int main(){
	int N,M;
	int dx[4]={0,1,0,-1};
	int dy[4]={1,0,-1,0};
	map<char,int> m;
	m['N']=0;
	m['E']=1;
	m['S']=2;
	m['W']=3;
	while(cin>>N,N){
		bool g[21][21];
		MEM(g,false);
		int x,y;
		REP(i,0,N){
			cin>>x>>y;
			g[y][x]=true;
		}
		cin>>M;
		char h;
		int d;
		int nowx=10,nowy=10;
		REP(i,0,M){
			cin>>h>>d;
			REP(j,0,d){
				nowx+=dx[m[h]];
				nowy+=dy[m[h]];
				if(g[nowy][nowx]){
					g[nowy][nowx]=false;
					N--;
				}
			}
		}
		p(N==0?"Yes":"No");
	}
	return 0;
}