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
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; }
template<class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); }

//math
//-------------------------------------------
template<class T> inline T sqr(T x) { return x*x; }

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
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,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

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

//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 mapgem[21][21];
VI wque;
vector<char> que;
VI gemx;
VI gemy;
string search(){
	//N y+ S y-
	//E x+ W x-
	int rx = 10;
	int ry = 10;
	int dx = 0;
	int dy = 0;
	int qsize = wque.size();
	mapgem[rx][ry]=0;
	REP(i,qsize){
		dx = 0;
		dy = 0;
		if(que[i] == 'N'){dy++;}
		else if(que[i] == 'S'){dy--;}
		else if(que[i] == 'E'){dx++;}
		else if(que[i] == 'W'){dx--;}
		REP(j,wque[i]){
			rx += dx;
			ry += dy;
			mapgem[rx][ry] = 0;
		}
	}
	REP(i,gemx.size()){
		if(mapgem[gemx[i]][gemy[i]]==1){return "No";}
	}
	return "Yes";
}
int main(){
	int endlchk =8101919;
	int	N;
	int M;
	char d;
	int l;
	int mx,my;
	while(true){
		if(endlchk != 8101919){cout << endl;}
		endlchk = 0;
		cin >> N;
		if(N==0){break;}
		REP(i,20){
			REP(j,20){
				mapgem[i][j]=0;
			}
		}
		REP(i,N){
			cin >> mx >> my;
			mapgem[mx][my] = 1;
			gemx.push_back(mx);
			gemy.push_back(my);
		}
		cin >> M;
		REP(i,M){
			cin >> d >> l;
			que.push_back(d);
			wque.push_back(l);
		}
		
		cout << search();
		que.clear();
		wque.clear();
		gemx.clear();
		gemy.clear();
	}
	return 0;
}

C++: #include<stdio.h>
#include<iostream>
using namespace std;
struct JWE{bool f;int x;int y;};

int main(){
bool ma[21][21]={};
JWE JW[21];
int n1,n2,x,y,k;
char ch;

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

scanf("%d",&n1);
for(int i=0;i<n1;i++){
cin>>x>>y;
JW[i].x=x;JW[i].y=y;
}
x=10;y=10;
scanf("%d",&n2);
for(int ii=0;ii<n2;ii++){
cin>>ch>>k;

if(ch=='N'){
for(int j=y;j<=y+k;j++)
ma[x][j]=true;
}
else if(ch=='S'){
for(int j=y;j>=y-k;j--)
ma[x][j]=true;
}
else if(ch=='E'){
for(int j=x;j<=x+k;j++)
ma[j][y]=true;
}
else if(ch=='W'){
for(int j=x;j>=x-k;j--)
ma[j][y]=true;
}

}

int sum=0;
for(int i=0;i<n1;i++)
{if(ma[JW[i].x][JW[i].y]==true)sum++;}
if(n1==sum)printf("Yes\n");
else printf("No\n");

return 0;
}

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

typedef struct {
	int x, y;
} POINT;

int main(void)
{
	POINT p;
	char field[21][21];
	int n, m;
	
	while (1){
		memset(field, 0, sizeof(field));
		scanf("%d", &n);
		if (!n) break;
		for (int i = 0; i < n; i++){
			int x, y;
			
			scanf("%d%d", &x, &y);
			field[x][y] = 1;
		}
		p.x = p.y = 10;
		if (field[10][10] == 1){
			n--;
		}
		field[10][10] = 0;
		
		scanf("%d", &m);
		for (int i = 0; i < m; i++){
			char d[2];
			int step;
			
			scanf("%s%d", d, &step);
			for (int i = 0; i < step; i++){
				switch (d[0]){
				  case 'N': p.y++; break;
				  case 'E': p.x++; break;
				  case 'S':	p.y--; break;
				  case 'W': p.x--; break;
				}
				if (field[p.x][p.y] == 1){
					n--;
					field[p.x][p.y] = 0;
				}
			}
		}
		
		printf("%s\n", n == 0 ? "Yes" : "No");
	}
	
	return (0);
}

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

int Check(int jwelx[],int jwely[],int x,int y,int n){

  for(int i=0; i<n; i++){
    if(jwelx[i]==x && jwely[i]==y)
      return i;
  }
      
  return -1;
}


int main(){

  int n,m;
  int jwelx[20],jwely[20];
  int x,y,d;
  char angle;
  int sum;
  int tmp;

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

    for(int i=0; i<n; i++){
      cin >> jwelx[i] >> jwely[i];
    }

    cin >> m;
    sum=0;
    x=y=10;

    tmp = Check(jwelx,jwely,x,y,n);
    if(tmp!=-1){
      jwelx[tmp]=-1;
      sum++;
    }

    for(int i=0; i<m; i++){
      cin >> angle >> d;


      //  cout << "x:" << x << " y:" << y << endl;


      if(angle=='N'){
	for(int i=0; i<d; i++){
	  y++;

	  tmp = Check(jwelx,jwely,x,y,n);
	  if(tmp!=-1){
	    jwelx[tmp]=-1;
	    sum++;
	  }
	}
      }
      else if(angle=='E'){
	for(int i=0; i<d; i++){
	  x++;
	  
	  tmp = Check(jwelx,jwely,x,y,n);
	  if(tmp!=-1){
	    jwelx[tmp]=-1;
	    sum++;
	  }	  
	}
      }
      else if(angle=='S'){
	for(int i=0; i<d; i++){
	  y--;
	  
	  tmp = Check(jwelx,jwely,x,y,n);
	  if(tmp!=-1){
	    jwelx[tmp]=-1;
	    sum++;
	  }	  
	}
      }
      else{
	for(int i=0; i<d; i++){
	  x--;

	  tmp = Check(jwelx,jwely,x,y,n);
	  if(tmp!=-1){
	    jwelx[tmp]=-1;
	    sum++;
	  }
	}
      }

    }
    //for

    if(sum==n)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;

  }


  return 0;
}