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 <cstdio>
#include <cstdlib>
#include <string>
#include <vector>
#include <deque>
#include <list>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cmath>
#include <cstring>
#include <cctype>
#include <sstream>
#include <set>
#include <map>
#include <queue>
#include <complex>
using namespace std;

int main() {
	int N, M, x, y;
	pair<int, int> robot;
	int field[20][20];

	while(cin >> N, N) {
		for(int i=0; i<20; i++)
			for(int j=0; j<20; j++)
				field[i][j] = 0;
		robot.first = robot.second = 10;
		for(int i=0; i<N; i++) {
			cin >> x >> y;
			field[x][y] = 1;
		}
		cin >> M;
		for(int i=0; i<M; i++) {
			char drct;
			int dis;
			cin >> drct >> dis;
			if(drct == 'N') {
				for(int i=robot.second+1; i<=robot.second+dis; i++) {
					field[robot.first][i] = 0;
				}
				robot.second += dis;
			}
			else if(drct == 'E') {
				for(int i=robot.first+1; i<=robot.first+dis; i++) {
					field[i][robot.second] = 0;
				}
				robot.first += dis;
			}
			else if(drct == 'S') {
				for(int i=robot.second-dis+1; i<=robot.second; i++) {
					field[robot.first][i] = 0;
				}
				robot.second -= dis;
			}
			else if(drct == 'W') {
				for(int i=robot.first-dis+1; i<=robot.first; i++) {
					field[i][robot.second] = 0;
				}
				robot.first -= dis;
			}
		}
		int check = 0;
		for(int i=0; i<20; i++)
			for(int j=0; j<20; j++)
				check += field[i][j];

		if(check) cout << "No" << endl;
		else cout << "Yes" << endl;
	}

	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

int main(){
  int i, j, k;
  int q, w;
  int tempx, tempy, temp2, count;
  int N, M;
  char temp1;
  while(1){
    q = 10; w = 10; count = 0;
    int a[30][30] = {};
    cin>>N;
    if(N == 0) break;

    for(i = 0; i < N; i++){
      cin>>tempx>>tempy;
      a[tempx][tempy] = 1;
    cin>>M;

    if(a[w][q] == 1)count++;
    
    for(i = 0; i < M; i++){
      cin>>temp1>>temp2;
      if(temp1 == 'N') {
	for(j = 1; j <= temp2; j++){
	  q++;
	  if(a[w][q] == 1){
	    count++;
	     a[w][q] == 0;
	  }
	}
      }else if(temp1 == 'S'){
         for(j = 1; j <= temp2; j++){
	  q--;
	  if(a[w][q] == 1){
	    count++;
	     a[w][q] == 0;
	  }
	 }
	
      } else if(temp1 == 'E'){
	  for(j = 1; j <= temp2; j++){
  	   w++;
	   if(a[w][q] == 1){
	     count++;
	      a[w][q] == 0;
	   }
	  }
	
      } else if(temp1 == 'W'){
	 for(j = 1; j <= temp2; j++){
	  w--;
	  if(a[w][q] == 1){
	    count++;
	    a[w][q] == 0;
	  }
	
	 }
      }
	 
    }


    if(count == N)cout<<"Yes"<<endl;
    else cout<<"No"<<endl;

    
  }
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int n;
map<char, int> mp;
int dx[4] = {0, 0, 1, -1};
int dy[4] = {1, -1, 0, 0};

int main(){
//	cin.tie(0);
//	ios::sync_with_stdio(false);
	mp['N'] = 0;
	mp['S'] = 1;
	mp['E'] = 2;
	mp['W'] = 3;
	while(1){
		cin >> n;
		if(n == 0) return 0;
		int a[25][25] = {{}};
		for(int i=0; i<n; ++i){
			int x, y;
			cin >> x >> y;
			a[x][y] = 1;
		}
		int m;
		cin >> m;
		int p = 10, q = 10;
		int tmp = 0;
		if(a[p][q] == 1) ++tmp;
		for(int i=0; i<m; ++i){
			char c;
			int d;
			cin >> c >> d;
			for(int j=0; j<d; ++j){
				p += dx[mp.at(c)];
				q += dy[mp.at(c)];
				if(a[p][q] == 1) ++tmp;
			}
		}
		cout << (tmp == n ? "Yes\n" : "No\n");
	}
}

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

#define REP(i,b,c) for(int i=b;i<(int)c;i++)
#define rep(i,c) REP(i,0,c)

using namespace std;

int main(){
  char move1[1000];
  int i,j,k,n,m,jewel[1000][1000],move2[1000],count;
  int mapQ[50][50],startx,starty;


  for(i=0;i<=20;i++){
    for(j=0;j<=20;j++)mapQ[i][j]=0;
  }

  while(1){
    count = 0;
    cin >> n;
    if(n == 0)break;

    rep(i,n){
      cin >> jewel[i][0] >> jewel[i][1];
      mapQ[20-jewel[i][1]][jewel[i][0]]=1; //ツ陛ウツ静篠づ個暗環置ツづーツマツッツプツ湘」ツづ可篠ヲツつキツ（ツ１ツづ可渉可甘コツ可サツ）
	
	}

  

    cin >> m;

    rep(i,m)cin >> move1[i] >> move2[i];

    startx=10;
    starty=10;
    mapQ[starty][startx]=2; //ツスツタツーツトツ地ツ点ツづー2ツづ可渉可甘コツ可サ

    rep(i,m){
      for(j=1;j<=move2[i];j++){
	if(move1[i] == 'N'){
	  mapQ[--starty][startx];
	  if(mapQ[starty][startx] == 1)count++;
	    mapQ[starty][startx]=0;
	}
	else if(move1[i] == 'E'){
	  mapQ[starty][++startx];
	  if(mapQ[starty][startx] == 1)count++;
	  	 mapQ[starty][startx]=0;
	}
	else if(move1[i] == 'S'){
	  mapQ[++starty][startx];
	  if(mapQ[starty][startx] == 1)count++;
	   mapQ[starty][startx]=0;
	}
	else if(move1[i] == 'W'){
	  mapQ[starty][--startx];
	  if(mapQ[starty][startx] == 1)count++;
	  mapQ[starty][startx]=0;
	}

      }
    }
    //    rep(i,21){
    //   rep(j,21)cout << mapQ[i][j] << " - " ;
    //   cout << endl; 
    //   }
    //   cout << "count =" << count <<  " n =" << n << endl;    

    
    count == n ? cout << "Yes" << endl : cout << "No" << endl ; 
    
    
  }
  
  
 return 0;
 
}

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

int main(){

  int n;
  bool d[100][100]; //x,y
  int x,y;
  int p;
  char c;

  while(cin >> n, n){

    memset(d,false,sizeof(d));

    while(n--){
      cin >> x >> y;
      d[x][y] = true;
    }

    x = y = 10;
    cin >> n;
    while(n--){
      cin >> c >> p;
      
	for(int i=0;i<p;i++){
	  if(c == 'N') y++;
	  if(c == 'E') x++;
	  if(c == 'W') x--;
	  if(c == 'S') y--;

	  if(d[x][y]) d[x][y] = false;
	}
    }

    bool ans = true;
 
    for(int i=0;i<100;i++){
      for(int j=0;j<100;j++){
	if(d[i][j]) ans = false;
      }
    }

    if(ans) cout << "Yes" << endl;
    else cout << "No" << endl;
  }
}