#include <bits/stdc++.h>
#define pb push_back
#define endl "\n"
// #define pb push_back
using namespace std;
typedef pair<int, int> pii;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;


void solve(){
    int N, n, M, m, k, q;
    cin >> N >> n >> M >> m >> k >> q;
    vector<pii> a, b;
    for (int i = 0; i < n; ++i) {
        int l, v;
        cin >> l >> v;
        v--;
        a.pb({l, v});
    }
    for (int i = 0; i < m; ++i){
        int l, v;
        cin >> l >> v;
        v--;
        b.pb({l, v});
    }
    vector<int> sma(n + 1, 0), smb(m + 1, 0);
    for (int i = 0; i < n; ++i){
        sma[i + 1] = sma[i] + a[i].first;
    }
    for (int i = 0; i < m; ++i){
        smb[i + 1] = smb[i] + b[i].first;
    }
    vector<pii> ind(k, {-1, -1});
    for (int i = 0; i < n; ++i){
        ind[a[i].second].first = i;
    }
    for (int i = 0; i < m; ++i){
        ind[b[i].second].second = i;
    }
    vector<int> good(k, 0);
    for (int now = n - 1; now > -1; --now){
        int el = a[now].second;
        int i = now;
        int j = ind[el].second;
        if (j == -1) continue;
        int len = min(a[i].first, b[j].first);
        int ok = 0;
        for (int el1 = 0; el1 < k; ++el1){
            if (ind[el1].first > i && ind[el1].second > j){
                if (good[el1] == 0) ok = 1;
            }
        }
        good[el] = ok;
    }

    while (q--){
        int x, y;
        cin >> x >> y;
        int l, r;
        l = -1, r = n;
        while (r - l > 1){
            int md = (l + r) / 2;
            if (sma[md + 1] >= x) l = md;
            else r = md;
        }
        int i = l;
        l = -1; r = n;
        while (r - l > 1){
            int md = (l + r) / 2;
            if (smb[md + 1] >= y) l = md;
            else r = md;
        }
        int j = l;
        // i, j
        int len = min(sma[i + 1] - x, smb[j + 1] - y);
        if (len % 2 || good[a[i].second]){
            cout << "Yes" << endl;
            continue;
        } else{
            cout << "No" << endl;
        }

    }
}



signed main(){
    ios_base::sync_with_stdio(0); cin.tie(0);
    int t = 1;
    // cin >> t;
    while (t--){
        solve();
    }
}