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;

int main()
{
    int n, m, x, y;
    int a[21][21];
    char c;

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

        for( int i = 0; i < 21; i++ )
            for( int j = 0; j < 21; j++ )
                a[i][j] = false;

        for( int i = 0; i < n; i++ )
        {
            cin >> x >> y;
            a[20-y][x] = true;
        }

        cin >> m;

        int cnt = 0, s = 10, t = 10;
        for( int i = 0; i < m; i++ )
        {
            cin >> c >> x;
            while( x-- )
            {
                if( c == 'N' )
                    s--;
                else if( c == 'S' )
                    s++;
                else if( c == 'E' )
                    t++;
                else
                    t--;
                if( a[s][t] == true )
                {
                    a[s][t] = false;
                    cnt++;
                }
            }
        }
        if( cnt == n )
            cout << "Yes" << endl;
        else
            cout << "No" << endl;
    }
    return 0;
}

C++:  #include<bits/stdc++.h>
using namespace std;
int main(){

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

    int w[n];
    int v[n];
    int t[n];
    int x=10,y=10;
    
    for(int i=0;i<n;i++){
      cin>>w[i]>>v[i];
    }
    
    int m;
    cin>>m;
    int k=0;
    
    for(int i=1;i<=m;i++){
      string a;
      int b;
      cin>>a>>b;
      
      if(a=="N"){
	for(int j=1;j<=b;j++){
	  y++;
	  for(int h=0;h<n;h++){
	    if(x==w[h]&&y==v[h]){
	      t[h]=1;
	    }
	  }
	}
      }
      
      else if(a=="S"){
	for(int j=1;j<=b;j++){
	  y--;
	  for(int h=0;h<n;h++){
	    if(x==w[h]&&y==v[h]){
	      t[h]=1;
	    }
	  }
	}
      }
      
      else if(a=="E"){
	for(int j=1;j<=b;j++){
	  x++;
	  for(int h=0;h<n;h++){
	    if(x==w[h]&&y==v[h]){
	      t[h]=1;
	    }
	  }
	}
      }
      
      else if(a=="W"){
	for(int j=1;j<=b;j++){
	  x--;
	  for(int h=0;h<n;h++){
	    if(x==w[h]&&y==v[h]){
	      t[h]=1;
	    }
	  }
	}
      }
    }
    
    for(int i=0;i<n;i++){
      if(t[i]==1){
	k++;
      }
    }
    
    if(k>=n){
      
      cout<<"Yes"<<endl;
    }
    else{cout<<"No"<<endl;
      
    }
  }
}

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

using namespace std;

int main(){
	while(1){
		
		int n;
		cin >> n;
		
		if(n==0)
			return 0;
		
		vector<pair<int,int> > co(n);
		
		for(int i=0;i<n;i++)
			cin >> co[i].first >> co[i].second;
		
		int cc;
		
		cin >> cc;
		
		vector<pair<string,int> > cm(cc);
		
		for(int i=0;i<cc;i++){
			cin >> cm[i].first >> cm[i].second;
		}
		
		int ma[21][21]={};
		
		int nx=10,ny=10;
		int xy,xx;
		for(int i=0;i<cc;i++){
			if(cm[i].first == "N"){
				xx=0;xy=1;
			}else if(cm[i].first == "E"){
				xx=1;xy=0;
			}else if(cm[i].first == "S"){
				xx=0;xy=-1;
			}else{
				xx=-1;xy=0;
			}
			
			for(int j=0;j<cm[i].second;j++){
				nx+=xx;ny+=xy;
				ma[nx][ny] = 1;
			}
		}
		
		for(int i=0;i<n;i++){
			if(ma[co[i].first][co[i].second] != 1){
				cout << "No" << endl;
				break;
			}else if(i==n-1){
				cout << "Yes" << endl;
			}
		}
	}
}

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

#define fi first
#define se second

int main() {
	int N;

	while(cin >> N, N) {
		vector<pair<int,int> > t;
		for(int i = 0; i < N; i++) {
			int x, y;
			cin >> x >> y;
			t.push_back(pair<int,int>(x,y));
		}

		int M;
		cin >> M;
		pair<int,int> rob(10,10);

		for(int i = 0; i < M; i++) {
			char dir;
			int amo;

			cin >> dir >> amo;

			for(int j = 0; j < amo; j++) {
				switch(dir) {
					case 'E':
						rob.fi++;
						break;
					case 'W':
						rob.fi--;
						break;
					case 'N':
						rob.se++;
						break;
					case 'S':
						rob.se--;
						break;
				}

				for(int j = 0; j < t.size(); j++) {
					if(rob == t[j]) {
						t.erase(t.begin() + j);
					}
				}
			}
		}

		if(t.size())
			cout << "No" << endl;
		else
			cout << "Yes" << endl;
	}
	return 0;
}

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

int main() {
	long long N;
	while (cin >> N) {
		if (N == 0) return 0;
		vector<pair<long long, long long> > VP(N);
		for (int i = 0; i < N; i++) cin >> VP[i].first >> VP[i].second;
		long long M;
		vector<vector<bool> > B(21, vector<bool>(21, false));
		long long X = 10, Y = 10;
		B[10][10] = true;
		cin >> M;
		for (int i = 0; i < M; i++) {
			char C;
			long long L;
			cin >> C >> L;
			if (C == 'N') {
				for (int j = 0; j < L; j++) {
					Y++;
					B[X][Y] = true;
				}
			}
			if (C == 'S') {
				for (int j = 0; j < L; j++) {
					Y--;
					B[X][Y] = true;
				}
			}
			if (C == 'E') {
				for (int j = 0; j < L; j++) {
					X++;
					B[X][Y] = true;
				}
			}
			if (C == 'W') {
				for (int j = 0; j < L; j++) {
					X--;
					B[X][Y] = true;
				}
			}
		}
		bool check = true;
		for (int i = 0; i < N; i++) {
			if (!B[VP[i].first][VP[i].second]) check = false;
		}
		cout << (check ? "Yes" : "No") << endl;
	}
}