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



main() {
    ios_base::sync_with_stdio(0); cin.tie(0);
    int N, n, M, m, k, q;
    cin >> N >> n >> M >> m >> k >> q;
    vector < int > la(n), va(n), lb(m), vb(m);
    for (int i = 0; i < n; i++)
        cin >> la[i] >> va[i];
    for (int i = 0; i < m; i++)
        cin >> lb[i] >> vb[i];
    vector < int > A, B;
    for (int i = 0; i < n; i++)
        for (int j = 0; j < la[i]; j++)
            A.push_back(va[i]);
    for (int i = 0; i < m; i++)
        for (int j = 0; j < lb[i]; j++)
            B.push_back(vb[i]);
    vector < vector < int > > VA(k + 1), VB(k + 1);
    for (int i = 0; i < N; i++) VA[A[i]].push_back(i);
    for (int i = 0; i < M; i++) VB[B[i]].push_back(i);
    for (int i = 1; i <= k; i++) VA[i].push_back(N);
    for (int i = 1; i <= k; i++) VB[i].push_back(M);

    vector < vector < int > > dp(N + 1, vector < int > (M + 1, -1));
    function < pair < int , int > (int, int, int) > frst = [&](int K, int l, int r) {
        int L = *upper_bound(begin(VA[K]), end(VA[K]), l);
        int R = *upper_bound(begin(VB[K]), end(VB[K]), r);
        return make_pair(L, R);
    };
    function < int(int, int) > f = [&](int l, int r) {
        if (dp[l][r] != -1) return dp[l][r];
        for (int K = 1; K <= k; K++) {
            auto [L, R] = frst(K, l, r);
            if (L == N || R == N) continue;
            if (!f(L, R)) {
                return dp[l][r] = 1;
            }
        }
        return dp[l][r] = 0;
    };
    while (q--) {
        int l, r;
        cin >> l >> r;
        if (!f(l, r)) {
            cout << "Yes\n";
        } else {
            cout << "No\n";
        }
    }
}
