#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <experimental/random>

//#pragma GCC optimize("Ofast")
//#pragma GCC optimize("O3,unroll-loops")
using namespace std;
using namespace __gnu_pbds;
using ll = long long;
using ld = long double;
using str = string;
using ordered_set = tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update>;
const ll INF = 1e18, MOD = 1e9 + 7;
#define int long long

void solve();

signed main() {
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int _ = 1;
    //cin >> _;
    while (_--) {
        solve();
        cout << "\n";
    }
}

void solve() {
    int N, n, M, m, k, q;
    cin >> N >> n >> M >> m >> k >> q;
    vector<int> a;
    vector<int> b;
    vector<int> la;
    vector<int> lb;
    for (int i = 0; i < n; ++i) {
        int l, v;
        cin >> l >> v;
        v--;
        a.push_back(v);
        la.push_back(l);
    }
    for (int i = 0; i < m; ++i) {
        int l, v;
        cin >> l >> v;
        v--;
        b.push_back(v);
        lb.push_back(l);
    }
    n = a.size();
    m = b.size();
    vector<vector<int>> ba(n + 1, vector<int>(k));
    for (int i = 0; i < k; ++i) {
        ba[n][i] = n;
    }
    for (int i = n - 1; i >= 0; --i) {
        for (int j = 0; j < k; ++j) {
            ba[i][j] = ba[i + 1][j];
        }
        ba[i][a[i]] = i;
    }
    vector<vector<int>> bb(m + 1, vector<int>(k));
    for (int i = 0; i < k; ++i) {
        bb[m][i] = m;
    }
    for (int i = m - 1; i >= 0; --i) {
        for (int j = 0; j < k; ++j) {
            bb[i][j] = bb[i + 1][j];
        }
        bb[i][b[i]] = i;
    }
    vector<vector<bool>> dp(n + 1, vector<bool>(m + 1));
    for (int i = n - 1; i >= 0; --i) {
        set<int> u1;
        int cnt = 0;
        for (int j = m - 1; j >= 0; --j) {
            if (u1.find(b[j]) != u1.end()) {
                u1.erase(b[j]);
                cnt--;
            }
            int op = ba[i][b[j]];
            if (op != n && !dp[op + 1][j + 1]) {
                u1.insert(b[j]);
                cnt++;
            }
            if (cnt > 0) {
                dp[i][j] = true;
            }
        }
    }
    for (int i = 1; i < la.size(); ++i) {
        la[i] += la[i - 1];
    }
    for (int i = 1; i < lb.size(); ++i) {
        lb[i] += lb[i - 1];
    }
    for (int i = 0; i < q; ++i) {
        int x, y;
        cin >> x >> y;
        int l = -1;
        int r = (int) la.size();
        while (r - l > 1) {
            int mi = (r + l) / 2;
            if (la[mi] <= x) {
                l = mi;
            } else {
                r = mi;
            }
        }
        x = r;
        l = -1;
        r = (int) lb.size();
        while (r - l > 1) {
            int mi = (r + l) / 2;
            if (lb[mi] <= x) {
                l = mi;
            } else {
                r = mi;
            }
        }
        y = r;
        if (dp[x][y]) {
            cout << "Yes\n";
        } else {
            cout << "No\n";
        }
    }
}