#include <bits/stdc++.h>
using namespace std;
#define int long long

int k;
vector<vector<int>> v1, v2;
map<pair<int, int>, int> dp;

int f(int i, int j){
    if (dp[{i, j}] != 0) return dp[{i, j}];
    for (int x = 1; x <= k; ++x){
        auto iit = upper_bound(v1[x].begin(), v1[x].end(), i);
        if (iit == v1[x].end()) continue;
        int ii = *iit;
        auto jit = upper_bound(v2[x].begin(), v2[x].end(), j);
        if (jit == v2[x].end()) continue;
        int jj = *jit;
        int qw = f(ii, jj);
        if (qw == 1) return (dp[{i, j}] = 2);
    }
    return (dp[{i, j}] = 1);
}

int32_t main()
{
    ios::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    int n, m, nn, mm, q, ind = 0; cin >> n >> nn >> m >> mm >> k >> q;
    if (n >= 1000 || m >= 1000 || k == 1){
        for (int i = 0; i < nn; ++i){
            int a, b; cin >> a >> b;
        }
        for (int i = 0; i < mm; ++i){
            int a, b; cin >> a >> b;
        }
        while (q--){
            int x, y; cin >> x >> y;
            x = n - x; y = m - y;
            cout << (min(x, y)%2 == 1 ? "Yes\n" : "No\n");
        }
        return 0;
    }
    v1.resize(k+1); v2.resize(k+1);
    int kk = 0;
    map<int, int> ma; int xq = 1;
    for (int i = 0; i < nn; ++i){
        int l, u; cin >> l >> u;
        if (ma[u] == 0) ma[u] = xq++;
        while (l--){
            v1[ma[u]].push_back(ind); ind++;
        }
        kk = max(kk, xq);
    }
    ind = 0;
    for (int i = 0; i < mm; ++i){
        int l, u; cin >> l >> u;
        if (ma[u] == 0) ma[u] = xq++;
        while (l--){
            v2[ma[u]].push_back(ind); ind++;
        }
        kk = max(kk, xq);
    }
    k = kk;
    while (q--){
        int x, y; cin >> x >> y; int ans = 1;
        for (int xx = 1; xx <= k; ++xx){
            auto iit = lower_bound(v1[xx].begin(), v1[xx].end(), x);
            if (iit == v1[xx].end()) continue;
            int ii = *iit;
            auto jit = lower_bound(v2[xx].begin(), v2[xx].end(), y);
            if (jit == v2[xx].end()) continue;
            int jj = *jit;
            int qw = f(ii, jj);
            if (qw == 1) ans = 2;
        }
        cout << (ans == 1 ? "No\n" : "Yes\n");
    }
}
