#include<bits/stdc++.h>
using namespace std;
using ll = long long;

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

#define FOR(i,a,b) for(ll i=(a);i<(b);++i)
#define ALL(v) (v).begin(), (v).end()
#define p(s) cout<<(s)<<endl
#define p2(s, t) cout << (s) << " " << (t) << endl
#define br() p("")
#define pn(s) cout << (#s) << " " << (s) << endl
#define p_yes() p("Yes")
#define p_no() p("No")

const ll mod = 1e9 + 7;
const ll inf = 1e18;

template < typename T >
void vprint(T &V){
	for(auto v : V){
    	cout << v << " ";
	}
	cout << endl;
}

struct Point{
    ll x;
    ll y;
    Point(ll x, ll y): x(x), y(y) {}
    Point(){}
};

ll field[21][21];

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    // input
    for(;;){
        // jewel num
        ll N;
        cin >> N;

        if(N==0) return 0;

        Point p = Point(10, 10);

        FOR(i, 0, 21){
            FOR(j, 0, 21){
                field[i][j] = 0;
            }
        }

        // jewel position
        FOR(i, 0, N){
            ll x, y;
            cin >> x >> y;
            field[y][x] = 1;
        }

        // move
        ll count = 0;
        ll M; cin >> M;
        FOR(i, 0, M){
            char c; cin >> c;
            ll len; cin >> len;

            FOR(j, 0, len){
                if(c=='N') p.y++;
                if(c=='S') p.y--;
                if(c=='E') p.x++;
                if(c=='W') p.x--;
                if(field[p.y][p.x]==1){
                    field[p.y][p.x] = 0;
                    count++;
                }
            }
        }
        if(count==N){
            p_yes();
        }else{
            p_no();
        }
    }

    
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template<class T,class U> using P = pair<T,U>;
template<class T> using vec = vector<T>;
template<class T> using vvec = vector<vec<T>>;

class BVCC{
private:
    vector<int> ord,low,used;
    vector<vector<int>> g;
    vector<vector<P<int,int>>> bc;
    vector<P<int,int>> tmp;
    int N,K = 0;
public:
    set<int> ap;
    BVCC(int n,vector<vector<int>> v){
        N = n;
        g = v;
        ord = low = vector<int>(N,-1);
        used = vector<int>(N,0);
    }
    void dfs(int now,int prev){
        used[now] = 1;
        ord[now] = K++;
        low[now] = ord[now];
        int cnt = 0;
        for(auto x:g[now]) if(x!=prev){
            if(ord[x]<ord[now]){
                tmp.emplace_back(min(now,x),max(now,x));
            }
            if(!used[x]){
                cnt++;
                dfs(x,now);
                low[now] = min(low[now],low[x]);
                if(low[x]>=ord[now]){
                    if(now!=0) ap.insert(now);
                    bc.push_back({});
                    while(true){
                        P<int,int> e = tmp.back();
                        bc.back().emplace_back(e);
                        tmp.pop_back();
                        if(min(now,x)==e.first && max(now,x)==e.second) break;
                    }
                }
            }else low[now] = min(low[now],ord[x]);
        }
        if(now==0 && cnt>=2) ap.insert(now);
    }
    void decomposition(){
        dfs(0,-1);
    }
};

int N,M;
int main(){
    cin >> N >> M;
    vector<vector<int>> v(N);
    int a,b;
    for(int i=0;i<M;i++){
        cin >> a >> b;
        v[a].push_back(b); v[b].push_back(a);
    }
    BVCC bvcc(N,v);
    bvcc.decomposition();
    for(auto x:bvcc.ap) cout << x << endl;
}
