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: #?????????????????§?¨?x,y
x = 10
y = 10
i = 0
j = 0
roboPos = []
#?????????????????????????????°
gemPos = 0
#??§?¨????????????????????????°
orderPos = 0
#??????????????°
gemNum = 0
#??????????????°
orderNum = 0
#??????????????????
cnt = 0
#???????????§?¨?
gemXY = []

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:
                        #print("????????????????????°??????")
                        #print("?????¨???????????§?¨????{0},{1}".format(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:
                        #print("????????????????????°??????")
                        #print("?????¨???????????§?¨????{0},{1}".format(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:
                        #print("????????????????????°??????")
                        #print("?????¨???????????§?¨????{0},{1}".format(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:
                        #print("????????????????????°??????")
                        #print("?????¨???????????§?¨????{0},{1}".format(x,y))
                        cnt += 1

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

Python: OFFSET = {"N": (0, 1),
          "E": (1, 0),
          "S": (0, -1),
          "W": (-1, 0)}

while True:
    N = int(input().strip())

    if N == 0:
        break

    gem_coords = []
    for _ in range(N):
        x, y = [int(s) for s in input().strip().split()]
        gem_coords.append((x, y))

    

    now_x, now_y = (10, 10)
    M = int(input().strip())
    for _ in range(M):
        direction, dist_str = input().strip().split()

        for _ in range(int(dist_str)):
            now_x += OFFSET[direction][0]
            now_y += OFFSET[direction][1]

            if (now_x, now_y) in gem_coords:
                gem_coords.remove((now_x, now_y))

    if len(gem_coords) == 0:
        print("Yes")
    else:
        print("No")

Python: def get_input_data():
    input_data = int(input())
    return input_data

def get_two_data():
    two_data = input().split()
    for i in range(2):
        two_data[i] = int(two_data[i])
    return two_data

def make_gem_map(gem_num):
    gem_map = set()
    for i in range(gem_num):
        gem_map.add(tuple(get_two_data()))
    return gem_map

def make_order(order_num):
    order = [None] * order_num
    for i in range(order_num):
        order[i] = input().split()
        order[i][1] = int(order[i][1])
    return order

class Robot:

    def __init__(self, gem_map, order):
        self.x, self.y = (10, 10)
        self.gem_map = gem_map
        self.order = order

    def move_and_catch_gems(self):
        self.gem_map.discard((self.x, self.y))
        for i in range(len(order)):
            direction, vector = order[i]
            for j in range(vector):
                if direction == "N":
                    self.y += 1
                elif direction == "S":
                    self.y -= 1
                elif direction == "E":
                    self.x += 1
                else:
                    self.x -= 1
                self.gem_map.discard((self.x, self.y))

if __name__ == "__main__":
    while True:
        gem_num = get_input_data()
        if gem_num == 0:
            break
        gem_map = make_gem_map(gem_num)
        order_num = get_input_data()
        order = make_order(order_num)
        robot = Robot(gem_map, order)
        robot.move_and_catch_gems()
        if robot.gem_map:
            print("No")
        else:
            print("Yes")