#include #include #include using namespace std; int main() { for (int N; cin >> N, N; ) { set > items; for (int i = 0; i < N; i++) { int x, y; cin >> x >> y; items.insert(make_pair(x, y)); } int x = 10, y = 10, M; cin >> M; while (M--) { char d; int l; cin >> d >> l; while (l--) { switch (d) { case 'N': y++; break; case 'E': x++; break; case 'S': y--; break; case 'W': x--; break; } items.erase(make_pair(x, y)); } } cout << (items.empty() ? "Yes" : "No") << endl; } return 0; }