#include <bits/stdc++.h>

using namespace std;
using ll = long long;

void solve() {
    int N, sn, M, sm, k, q;
    cin >> N >> sn >> M >> sm >> k >> q;
    vector<pair<int, int>> segN(sn), segM(sm);
    vector<int> a(N), b(M);
    for (int i = 0, head = 0; i < segN.size(); ++i) {
        cin >> segN[i].first >> segN[i].second;
        --segN[i].second;
        for (int _ = 0; _ < segN[i].first; ++_) {
            a[head++] = segN[i].second;
        }
    }
    for (int i = 0, head = 0; i < segM.size(); ++i) {
        cin >> segM[i].first >> segM[i].second;
        --segM[i].second;
        for (int _ = 0; _ < segM[i].first; ++_) {
            b[head++] = segM[i].second;
        }
    }

    vector dp(N, vector<int>(M, -1));
    /*
     * dp[i][j] = false => can't win
     * dp[i][j] = x + 1 => the only winning move
     * dp[i][j] = k + 2 => several winning moves
     */
    vector<int> last_a(k, -1);
    for (int i = N - 1; i >= 0; --i) {
        vector<int> val(k, -1);
        int cnt[2]{};
        int f = -1;
        for (int j = M - 1; j >= 0; --j) {
            if (a[i] == b[j]) {
                if (cnt[0]) {
                    dp[i][j] = cnt[0] > 1 ? k + 2 : f + 1;
                } else {
                    dp[i][j] = false;
                }
            }
            if (last_a[b[j]] != -1) {
                int x = b[j];
                if (val[x] != -1) {
                    cnt[bool(val[x])] -= 1;
                }
                cnt[val[x] = bool(dp[last_a[x]][j])] += 1;
                if (val[x] == 0) {
                    f = x;
                }
            }
        }
        last_a[a[i]] = i;
    }

    while (q--) {
        int i, j;
        cin >> i >> j;
        if (dp[i][j] == false || dp[i][j] != a[i] + 1) {
            cout << "Yes\n";
        } else {
            cout << "No\n";
        }
    }
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int test = 1;
//    cin >> test;
    while (test--) {
        solve();
    }

    return 0;
}