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>

int main(int argc, char const* argv[])
{
  while (true) {
    int N;
    std::cin >> N;
    if (N == 0) {
      break;
    }
    int grid[21][21];
    for (int i = 0; i < 21; ++i) {
      for (int j = 0; j < 21; ++j) {
        grid[i][j] = 0;
      }
    }
    for (int i = 0; i < N; ++i) {
      int x, y;
      std::cin >> x >> y;
      ++grid[x][y];
    }
    int M;
    std::cin >> M;
    int cur_x = 10, cur_y = 10;
    for (int j = 0; j < M; ++j) {
      char d; int i;
      std::cin >> d >> i;
      switch (d) {
        case 'N':
          // y+
          for (int k = 0; k < i; ++k) {
            ++cur_y;
            grid[cur_x][cur_y] = 0;
          }
          break;
        case 'E':
          // x+
          for (int k = 0; k < i; ++k) {
            ++cur_x;
            grid[cur_x][cur_y] = 0;
          }
          break;
        case 'S':
          // y-
          for (int k = 0; k < i; ++k) {
            --cur_y;
            grid[cur_x][cur_y] = 0;
          }
          break;
        case 'W':
          // x-
          for (int k = 0; k < i; ++k) {
            --cur_x;
            grid[cur_x][cur_y] = 0;
          }
          break;
      }
    }

    for (int k = 0; k < 21; ++k) {
      for (int l = 0; l < 21; ++l) {
        if (grid[k][l] > 0) {
          std::cout << "NO" << std::endl;
          goto finish;
        }
      }
    }
    std::cout << "YES" << std::endl;
finish:
    ++M;
  }
  return 0;
}

C++: 
#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <stack>
#include <cctype>
#include <complex>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
#include <cassert>

using namespace std;

int jw[22][22] = {0};
complex<int> rob(10,10);

complex<int> Mov(char dir){
	char a[4] = {'N','W','S','E'};
	int dx[4] = {0,-1,0,1};
	int dy[4] = {1,0,-1,0};
	for(int i=0;i<4;i++){
		if(a[i]==dir){
			complex<int> mov(dx[i],dy[i]);
			return mov;
		}
	}
}

bool solve(){
	while(1){
		int n;
		cin>> n;
		if(!n) break;
		for(int i=0;i<n;i++){
			int x,y;
			cin>> x>> y;
			jw[x][y]++;
		}
		int m;
		cin>> m;
		int cnt=0;
		if(jw[10][10]){
			jw[10][10] = 0;
			cnt++;
		}
		for(int i=0;i<m;i++){
			char dir;
			int d;
			cin>> dir>> d;
			for(int j=0;j<d;j++){
				rob += Mov(dir);
				int x = rob.real();
				int y = rob.imag();
				if(jw[x][y]){
					jw[x][y] = 0;
					cnt++;
				}
			}
		}
		
		if(cnt==n){
			cout<< "Yes"<< endl;
		}else{
			cout<< "No"<< endl;
		}
	}
	
	return true;
}

int main(){
	cout.setf(ios::fixed);
	cout.precision(10);
	solve();

	return 0;
}

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

int main(){
  int n;
  cin >> n;
  while(n != 0){
    vector<pair<int, int> > v;
    int x, y;
    for(int i = 0; i < n; i++){
      cin >> x >> y;
      v.push_back(make_pair(x, y));
    }

    int m;
    cin >> m;

    char c;
    int d;
    int rx = 10;
    int ry = 10;
    int tmpx, tmpy;
    int count = 0;
    for(int i = 0; i < m; i++){
      cin >> c >> d;
      tmpx = rx;
      tmpy = ry;

      if(c == 'N')ry += d;
      else if(c == 'E')rx += d;
      else if(c == 'S')ry -= d;
      else rx -= d;    

      for(int j = 0; j < v.size(); j++){
        if(tmpx <= rx){
          if(v[j].first >= tmpx && v[j].first <= rx){
            if(tmpy <= ry){
              if(v[j].second >= tmpy && v[j].second <= ry){
                count++;
                v.erase(v.begin() + j);
              }
            }else{
              if(v[j].second <= tmpy && v[j].second >= ry){
                count++;
                v.erase(v.begin() + j);
              }
            }
          }
        }else{
          if(v[j].first <= tmpx && v[j].first >= rx){
            if(tmpy <= ry){
              if(v[j].second >= tmpy && v[j].second <= ry){
                count++;
                v.erase(v.begin() + j);
              }
            }else{
              if(v[j].second <= tmpy && v[j].second >= ry){
                count++;
                v.erase(v.begin() + j);
              }
            }
          }
        }
      }
    }
    cout << (count == n ? "Yes" : "No") << endl;
    cin >> n;
  }
}

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

int main(){
  int N;
  while(std::cin >> N, N){
    std::vector<int> x{},y{};
    x.reserve(N);
    y.reserve(N);
    int x_robo, y_robo;

    while(N--){
      std::cin >> x_robo >> y_robo;
      x.push_back(x_robo);
      y.push_back(y_robo);
    }

    x_robo = 10;
    y_robo = 10;

    int M;
    std::cin >> M;

    char d;
    int l;

    std::vector<int> x_pick_up{},y_pick_up{};
    while(M--){
      std::cin >> d >> l;
      switch(d){
      case 'S':
        l = -l;
        // No break
      case 'N':
        for(auto x_it = std::find(x.begin(),x.end(),x_robo); x.end() != x_it; x_it = std::find(std::next(x_it),x.end(),x_robo)){
          auto y_it = std::next(y.begin(),std::distance(x.begin(),x_it));
          if(y_robo <= (*y_it) && (*y_it) <= y_robo + l){ x_pick_up.push_back(*x_it); y_pick_up.push_back(*y_it); }
        }
        y_robo += l;
        break;
      case 'W':
        l = -l;
        // No break
      case 'E':
        for(auto y_it = std::find(y.begin(),y.end(),y_robo); y.end() != y_it; y_it = std::find(std::next(y_it),y.end(),y_robo)){
          auto x_it = std::next(x.begin(),std::distance(y.begin(),y_it));
          if(x_robo <= (*x_it) && (*x_it) <= x_robo + l){ x_pick_up.push_back(*x_it); y_pick_up.push_back(*y_it); }
        }
        x_robo += l;
        break;
      default:
        break;
      }
    }
    std::cout << ((std::is_permutation(x.begin(),x.end(),x_pick_up.begin()) &&
                   std::is_permutation(y.begin(),y.end(),y_pick_up.begin())) ? "Yes" : "No") << std::endl;
  }
  return 0;
}