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;

class Point{
	public:
		int x;
		int y;
};

class Treasure : public Point{
	public:
		bool get = false;
};

int main(){
	int N;	//# of treasure
	int M;	//# of command
	char direction;
	int move;	//l移動距離
	int num; //見つけた宝の数

	do	{
		cin >> N;
		if (N == 0){
			break;
		}

		Point Robot;
		Robot.x = 10;
		Robot.y = 10;
		
		int oldx;
		int oldy;

		Treasure* T = new Treasure[N];

		for (int i = 0; i < N; i++){
			cin >> T[i].x >> T[i].y;
		}

		num = 0;

		cin >> M;
		// 命令を読んで宝を探す
		for (int j = 0; j < M && num < N; j++){
			cin >> direction >> move;
			switch (direction){
				case 'N':
					oldy = Robot.y;
					Robot.y += move;
					for (int i = 0; i < N; i++){
						if (T[i].get == false && T[i].x == Robot.x && oldy <= T[i].y && T[i].y <= Robot.y){
							T[i].get = true;
							num++;
						}
					}
					break;
				case 'E':
					oldx = Robot.x;
					Robot.x += move;
					for (int i = 0; i < N; i++){
						if (T[i].get == false && T[i].y == Robot.y && oldx <= T[i].x && T[i].x <= Robot.x){
							T[i].get = true;
							num++;
						}
					}
					break;
				case 'S':
					oldy = Robot.y;
					Robot.y -= move;
					for (int i = 0; i < N; i++){
						if (T[i].get == false && T[i].x == Robot.x && oldy >= T[i].y && T[i].y >= Robot.y){
							T[i].get = true;
							num++;
						}
					}
					break;
				case 'W':
					oldx = Robot.x;
					Robot.x -= move;
					for (int i = 0; i < N; i++){
						if (T[i].get == false && T[i].y == Robot.y && oldx >= T[i].x && T[i].x >= Robot.x){
							T[i].get = true;
							num++;
						}
					}
					break;
				default:
					break;
			}
		}

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

	} while (N != 0);
	
	return 0;
}

C++: #include<stdio.h>
#include<iostream>

using namespace std;

struct{
  int x;
  int y;
} typedef Point;

int main(){

  while(1){
    int N,M,dis,cnt=0;
    char dir;
    cin >> N;
    if(N==0) break;
    Point point[N],rp;
  
    rp.x = 10;
    rp.y = 10;
  
    for(int i=0;i<N;i++){
      cin >> point[i].x >> point[i].y;
    }

    cin >> M;
    for(int i=0;i<M;i++){
      cin >> dir >> dis;
      for(int l=0;l<dis;l++){
	if(dir == 'N') rp.y++;
	else if(dir == 'S') rp.y--;
	else if(dir == 'E') rp.x++;
	else if(dir == 'W') rp.x--;

	for(int j=0;j<N;j++){
	  if(point[j].x==rp.x && point[j].y == rp.y){
	    cnt++;
	    point[j].x=10000;
	    point[j].y=10000;
	  }
	}
      }
    }
    printf("%s\n",(cnt==N) ? "Yes" : "No");
  }
  return 0;
}

C++: #include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
using namespace std;
using P = std::pair<int, int>;

int main() {
    int N;
    while(cin >> N, N) {
        vector<vector<int>> jp;
        jp.resize(21);
        for(int i=0; i<jp.size(); ++i) {
            jp[i].resize(21);
        }
        for(int i=0; i<N; ++i) {
            int x, y;
            cin >> x >> y;
            jp[x][y] = 1;
        }
        int M;
        cin >> M;
        P p = make_pair(10, 10);
        for(int i=0; i<M; ++i) {
            char d;
            int l;
            cin >> d >> l;
            if(d == 'N') {
                for(int j=0; j<=l; ++j) {
                    jp[p.first][p.second+j] = 0;
                }
                p.second += l;
            } else if(d == 'E') {
                for(int j=0; j<=l; ++j) {
                    jp[p.first+j][p.second] = 0;
                }
                p.first += l;
            } else if(d == 'S') {
                for(int j=0; j<=l; ++j) {
                    jp[p.first][p.second-j] = 0;
                }
                p.second -= l;
            } else {
                for(int j=0; j<=l; ++j) {
                    jp[p.first-j][p.second] = 0;
                }
                p.first -= l;
            }
        }
        bool completed = true;
        for(int i=0; i<jp.size(); ++i) {
            for(int j=0; j<jp[i].size(); ++j) {
                if(jp[i][j] == 1) completed = false;
            }
        }
        cout << (completed ? "YES" : "NO") << endl;
    }
}

C++: #include <bits/stdc++.h>

using namespace std;

// typedef
typedef long long ll;

// container util
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

// repetition
#define FOR(i,a,n) for(ll i = ((ll) a); i < ((ll) n); ++i)
#define REP(i,n) FOR(i,0,n)

//constant
const double    EPS     = 1e-10;
const double    PI      = acos(-1.0);
const int       INFTY   = (1<<21);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int main(void){
    cin.sync_with_stdio(false);
    for(;;){
        int N;
        cin>>N;
        if(N==0) break;
        vector<vector<bool>> m(21, vector<bool> (21, false));
        REP(i,N){
            int x,y;
            cin>>x>>y;
            m[x][y] = true;
        }
        int M,x=10,y=10;
        int ans=0;
        cin>>M;
        REP(i,M){
            char d;
            int l;
            cin>>d>>l;
            REP(ii,l){
                switch(d){
                    case 'N':
                        y++;
                        break;
                    case 'S':
                        y--;
                        break;
                    case 'W':
                        x--;
                        break;
                    case 'E':
                        x++;
                        break;
                }
                if(m[x][y]){
                    m[x][y] = false;
                    ans += 1;
                }
            }
        }
        cout<<(ans==N?"Yes":"No")<<endl;
    }
    return 0;
}