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 Robot {
private:
	int coordx;
	int coordy;
public:
	Robot();
	void Move(int x, int y);
	int getX() {return coordx;}
	int getY() {return coordy;}
};

//Initialization of robot. This is constructor what initialize robot (10,10).
Robot::Robot()
{
	coordx = 10;
	coordy = 10;
}

//Assign value(before robot move) into value(after robot move). 
void Robot::Move(int x, int y)
{
	coordx = x;
	coordy = y;
}

class Gem {
private:
	int coordx;
	int coordy;
	bool pickup;
public:
	Gem();
	void setlocation(int x, int y);
	void Pickup();
	void debug();
	bool getPickup() {return pickup;}
};

Gem::Gem()
{
	coordx = 0;
	coordy = 0;
	pickup = false;
}


void Gem::setlocation(int x, int y)
{
	coordx = x;
	coordy = y;
}
//This memba-function deciced wherther gem was picked up already or not.
void Gem::Pickup()
{
	if (pickup == false)
		pickup = true;
}

void Gem::debug()
{
	cout << coordx << coordy << pickup << "\n" ;
}

int main()
{
	bool yorn[20] = {};
	int loop = 0;
	int l = 0;

	while (1) {


		int g_num, o_num = 0;  //Number of gems
		int x[20] = {};
		int y[20] = {};
		char o_dir[20] = {};
		int o_dis[20] = {};
		int r_x, r_y = 0;
		int i, j, k = 0;

		Robot robot;

		Gem gems[20];

		r_x = robot.getX();
		r_y = robot.getY();

		cout << "Input number of gems:";
		cin >> g_num;

		if (g_num == 0)  // fin or not
			break;

		for (i = 0;i < g_num;i++) {

			cout << "Tell me the loction of gems :";
			cin >> x[i] >> y[i];

			gems[i].setlocation(x[i], y[i]);
		}

		cout << "Input number of your order:";
		cin >> o_num;

		for (i = 0;i < o_num;i++) {
			cout << "Tell me content of your order" << i + 1 << "(Direction,Distance):";
			cin >> o_dir[i] >> o_dis[i];
		}


		for (j = 0;j < o_num;j++) {
			for (i = 0;i < o_dis[j];i++) {

				if (o_dir[j] == 'N')
					robot.Move(r_x, r_y + 1);
				else if (o_dir[j] == 'E')
					robot.Move(r_x + 1, r_y);
				else if (o_dir[j] == 'S')
					robot.Move(r_x, r_y - 1);
				else if (o_dir[j] == 'W')
					robot.Move(r_x - 1, r_y);

				r_x = robot.getX();
				r_y = robot.getY();

				for (k = 0;k < g_num;k++) {
					if (r_x == x[k] && r_y == y[k])
						gems[k].Pickup();
				}

			}
		}

		// decide yes or no in this loop
		for (i = 0;i < g_num;i++) {
			if (gems[i].getPickup() == false) {
				yorn[l] = false;
				break;
			}
			if (i == g_num - 1)
				yorn[l] = true;
		}
		l++;
		loop++;

	}

	for (l = 0;l < loop;l++) {
		if (yorn[l] == false)
			cout << "No \n";
		else
			cout << "Yes \n";
	}

	return 0;

}

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

using namespace std;

#define rep(i,n) for(int i = 0;i < n;++i)

int main(){
  int n,o;
  while(cin >> n,n){
    int v[25][25] = {};
    int x,y;
    rep(i,n){
      cin >> x >> y;
      v[x][y] = 1;
    }
    int ans = 0;
    cin >> o;
    x = 10, y = 10;
    int d;
    string s;
    rep(i,o){
      cin >> s >> d;
      if(s == "W"){
        for(int j = x + d-1; j > x;--j){
          ans += v[j][y];
          v[j][y] = 0;
        }
        x -= d;
      }
      if(s == "E"){
        for(int j = x ; j <= x+d;++j){
          ans += v[j][y];
          v[j][y] = 0;
        }
        x += d;
      }
      if(s == "S"){
        for(int j = y + d-1; j > y;--j){
          ans += v[x][j];
          v[x][j] = 0;
        }
        y -= d;
      }
      if(s == "N"){
        for(int j = y ; j <= y+d;++j){
          ans += v[x][j];
          v[x][j] = 0;
        }
        y += d;
      }
    /* cout << x << ' ' << y << endl; */
    }
    if(ans == n){
      cout << "Yes" << endl;
    }
    else
      cout << "No" << endl;
  }
  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;


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 jw[22][22] = {0};
		complex<int> rob(10,10);
		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;
}