#include<bits/stdc++.h>
//#include<ext/pb_ds/assoc_container.hpp>
#define ll long long

using namespace std;
//using namespace __gnu_pbds;

ll N, n, M, m, k, q;
vector<string> ans;
vector<pair<ll, ll>> a, b, zs;

void input() {
    cin >> N >> n >> M >> m >> k >> q;
    a.resize(n);
    for (ll i = 0; i < n; i++) {
        cin >> a[i].first >> a[i].second;
    }
    b.resize(m);
    for (ll i = 0; i < m; i++) {
        cin >> b[i].first >> b[i].second;
    }
    zs.resize(q);
    for (ll i = 0; i < q; i++) {
        cin >> zs[i].first >> zs[i].second;
    }
}

void solve() {
    ans.resize(q);
    vector<vector<bool>> dp(n, vector<bool>(m));
    vector<vector<ll>> minl(n, vector<ll>(m));
    ll minlose = m + 1;
    for (ll i = n - 1; i > -1; i--) {
        for (ll j = m - 1; j > -1; j--) {
            if (a[i].second != b[j].second) {
                continue;
            }
            minl[i][j] = minlose;
            bool t = min(a[i].first, b[i].first) % 2;
            if (j > minlose || t) {
                dp[i][j] = true;
            } else {
                dp[i][j] = false;
                minlose = j;
            }
        }
    }
    vector<ll> prefsa(n + 1, 0), prefsb(m + 1, 0);
    for (ll i = 0; i < n; i++) {
        prefsa[i + 1] = prefsa[i] + a[i].first;
    }
    for (ll i = 0; i < m; i++) {
        prefsb[i + 1] = prefsb[i] + b[i].first;
    }
    for (ll i = 0; i < q; i++) {
        ll la = 0, ra = n + 1;
        while (ra - la > 1) {
            ll f = (la + ra) / 2;
            if (prefsa[f] < zs[i].first) {
                la = f;
            } else {
                ra = f;
            }
        }
        ll lb = 0, rb = m + 1;
        while (rb - lb > 1) {
            ll f = (lb + rb) / 2;
            if (prefsb[f] <= zs[i].second) {
                lb = f;
            } else {
                rb = f;
            }
        }
        ll fir = prefsa[ra] - zs[i].first;
        ll sec = prefsb[rb] - zs[i].second;
        bool t = min(fir, sec) % 2;
        if (lb > minl[la][lb] || t) {
            cout << "Yes" << "\n";
        } else {
            cout << "No" << "\n";
        }
    }
}

void output() {
}

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    input();
    solve();
    output();
    return 0;
}
