#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(ll i = 0, i##_len = (n); i < i##_len; ++i)
#define all(n) begin(n), end(n)
using ll = long long;
using vl = vector<ll>;

int main() {
  ll n;
  cin >> n;
  vl x(n);
  rep(i, n) cin >> x[i];
  ll l, q;
  cin >> l >> q;
  vector<vl> r(20, vl(n));
  rep(i, n) r[0][i] = upper_bound(all(x), x[i] + l) - x.begin() - 1;
  rep(k, 19) rep(i, n) r[k + 1][i] = r[k][r[k][i]];
  rep(_, q) {
    ll a, b;
    cin >> a >> b;
    if(a > b) swap(a, b);
    a--;
    b--;
    ll ans = 1;
    for(ll k = 19; k >= 0; k--)
      if(r[k][a] < b) {
        a = r[k][a];
        ans += 1 << k;
      }
    cout << ans << '\n';
  }
}
#include <bits/stdc++.h>

using namespace std;

int main() {

    int n, m, v;
    int dx[] = {0, 1, 0, -1};
    int dy[] = {1, 0, -1, 0};
    char d;
    char ds[] = "NESW";

    while(cin >> n, n) {

        int rx = 10, ry = 10, cnt = 0;
        int graph[21][21];

        memset(graph, 0, sizeof(graph));

        for(int i = 0, x, y; i < n; ++i) {
            cin >> x >> y;
            graph[y][x] = 1;
        }

        cin >> m;

        for(int i = 0; i < m; ++i) {

            cin >> d >> v;

            for(int j = 0; j < 4; ++j) {
                if(d == ds[j]) {
                    for(int k = 1; k <= v; ++k) {
                        rx += dx[j];
                        ry += dy[j];
                        if(graph[ry][rx] == 1) {
                            graph[ry][rx] = 0;
                            ++cnt;
                        }
                    }
                    break;
                }
            }

        }

        cout << (cnt == n ? "Yes" : "No") << endl;

    }

}