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)
	}
}

Python: class Goto(Exception):pass
while True:
    n=int(input())
    if n==0:
        break
    state=[[True for j in range(21)]for k in range(21)]
    for j in range(n):
        cor=[int(num)for num in input().split(' ')]
        state[cor[0]][cor[1]]=False
    m=int(input())
    now=[10,10]
    d=[[0,1],[1,0],[0,-1],[-1,0]]
    for i in range(m):
        com=input().split(' ')
        t=int(com[1])
        if com[0]=='N':
            for j in range(t):
                now[0]+=d[0][0]
                now[1]+=d[0][1]
                state[now[0]][now[1]]=True
        elif com[0]=='E':
            for j in range(t):
                now[0]+=d[1][0]
                now[1]+=d[1][1]
                state[now[0]][now[1]]=True
        elif com[0]=='S':
            for j in range(t):
                now[0]+=d[2][0]
                now[1]+=d[2][1]
                state[now[0]][now[1]]=True
        else:
            for j in range(t):
                now[0]+=d[3][0]
                now[1]+=d[3][1]
                state[now[0]][now[1]]=True
    try:
        for a in state:
            for s in a:
                if s==False:
                    print("No")
                    raise Goto()
        print("Yes")
    except Goto:pass

Python: 
# ロボットのXY座標
_robotXY = []

def RobotMove(dir, amt, stPoint):
    global _robotXY

    isXMove = True

    orgX, orgY = _robotXY
    if dir == "N":
        isXMove = False
        _robotXY[1] += amt
    elif dir == "E":
        _robotXY[0] += amt
    elif dir == "S":
        isXMove = False
        _robotXY[1] -= amt
    elif dir == "W":
        _robotXY[0] -= amt

    # X軸移動
    if isXMove:
        startX = min(orgX, _robotXY[0])
        endX = max(orgX, _robotXY[0])
        for i in range(startX, endX + 1):
            if [i, _robotXY[1]] in stPoint:
                stPoint.remove([i, _robotXY[1]])
    
    # Y軸移動
    else:
        startY = min(orgY, _robotXY[1])
        endY = max(orgY, _robotXY[1])
        for i in range(startY, endY + 1):
            if [_robotXY[0], i] in stPoint:
                stPoint.remove([_robotXY[0], i])



while True:
    _robotXY = [10, 10]

    n = int(input())
    if n == 0:
        break

    # 不思議な宝石の落ちている座標
    stPoint = [list(map(int, input().split())) for _ in range(n)]

    m = int(input())
    for _ in range(m):
        # ロボットを移動・チェック
        dir, amt = input().split()
        RobotMove(dir, int(amt), stPoint)

    if stPoint:
        print("No")
    else:
        print("Yes")

Python: #?????????????????§?¨?x,y
x = 10
y = 10
i = 0
j = 0
roboPos = []
#?????????????????????????????°
gemPos = 0
#??§?¨????????????????????????°
orderPos = 0
#??????????????°
gemNum = 0
#??????????????°
orderNum = 0
#??????????????????
cnt = 0
#???????????§?¨?
gemXY = []
#???????????????????????§?¨?
gemCollectedXY = []

def get_input():
    while True:
        try:
            a = input()
            if a == "0":
                break
            yield ''.join(a)
        except EOFError:
            break
if __name__ == "__main__":
    array = list(get_input())

    while orderPos + orderNum < len(array):

        gemNum = int(array[orderPos + orderNum])
        gemPos = orderPos + orderNum + 1
        #print("??????????????°???{0}".format(gemNum))
        for i in range(gemPos,gemPos+gemNum):
            gem_x,gem_y = array[i].split()
            gem_x,gem_y = int(gem_x),int(gem_y)
            gemXY.append([gem_x,gem_y])
            #print("??????????????????{0},{1}".format(gem_x,gem_y))

        orderNum = int(array[gemPos+gemNum])
        orderPos = gemPos+gemNum+1
        #print("??????????????°???{0}".format(orderNum))
        for i in range(orderPos,orderPos+orderNum):
            #print("?????????{0}".format(array[i]))
            direction,length = array[i].split()
            length = int(length)
            if  direction == "N":
                for j in range(length):
                    y += 1
                    if y > 20:
                        y = 20
                    #print("?????¨???????????§?¨????{0},{1}".format(x,y))
                    roboPos = [x,y]
                    if roboPos in gemXY and roboPos not in gemCollectedXY:
                        #print("????????????????????°??????")
                        #print("?????¨???????????§?¨????{0},{1}".format(x,y))
                        gemCollectedXY.append([x,y])
                        cnt += 1
            elif direction == "S":
                for j in range(length):
                    y -= 1
                    if y < 0:
                        y = 0
                    #print("?????¨???????????§?¨????{0},{1}".format(x,y))
                    roboPos = [x,y]
                    if roboPos in gemXY and roboPos not in gemCollectedXY:
                        #print("????????????????????°??????")
                        #print("?????¨???????????§?¨????{0},{1}".format(x,y))
                        gemCollectedXY.append([x,y])
                        cnt += 1
            elif direction == "E":
                for j in range(length):
                    x += 1
                    if x > 20:
                        x = 20
                    #print("?????¨???????????§?¨????{0},{1}".format(x,y))
                    roboPos = [x,y]
                    if roboPos in gemXY and roboPos not in gemCollectedXY:
                        #print("????????????????????°??????")
                        #print("?????¨???????????§?¨????{0},{1}".format(x,y))
                        gemCollectedXY.append([x,y])
                        cnt += 1
            else:
                for j in range(length):
                    x -= 1
                    if x < 0:
                        x = 0
                    #print("?????¨???????????§?¨????{0},{1}".format(x,y))
                    roboPos = [x,y]
                    if roboPos in gemXY and roboPos not in gemCollectedXY:
                        #print("????????????????????°??????")
                        #print("?????¨???????????§?¨????{0},{1}".format(x,y))
                        gemCollectedXY.append([x,y])
                        cnt += 1

        if cnt >= gemNum:
            print("Yes")
        else:
            print("No")
        #print("+++++++++++1???????????????+++++++++++++")
        del gemXY[:]
        x,y = 10,10
        cnt = 0
        del roboPos[:]
        del gemCollectedXY[:]