#include <bits/stdc++.h>

using namespace std;

#define int long long

vector<pair<int, int>> a, b;
vector<vector<int>> ga;
vector<vector<int>> gb;

int k;

bool dfs(int va, int vb) {
    bool lest = true;
    for (int i = 0; i < k; i++) {
        if (ga[va][i] != -1 && gb[vb][i] != -1) {
            lest = false;
        }
    }
    if (lest) {
        return min(a[va].second, b[vb].second) % 2;
    }
    bool vas = false;
    for (int i = 0; i < k; i++) {
        if (ga[va][i] != -1 && gb[vb][i] != -1) {
            vas |= dfs(ga[va][i], gb[vb][i]);
        }
    }
    return !vas;
}

void sovel() {
    int N, n, M, m, q;
    cin >> N >> n >> M >> m >> k >> q;
    a.resize(n);
    b.resize(m);
    for (int i = 0 ; i < n; i++) {
        cin >> a[i].first >> a[i].second;
        a[i].first--;
    }
    for (int i = 0; i < m; i++) {
        cin >> b[i].first >> b[i].second;
        b[i].first--;
    }
    ga.resize(n, vector<int>(k));
    gb.resize(m, vector<int>(k));
    vector<int> last_a(n, -1);
    for (int i = 0; i < n; i++) {
        for (int j = i; j >= 0; j--) {
            if (ga[j][a[i].first] == 0) {
                ga[j][a[i].first] = i;
            }
        }
    }
    for (int i = 0; i < m; i++) {
        for (int j = i; j >= 0; j--) {
            if (gb[j][b[i].first] == 0) {
                gb[j][b[i].first] = i;
            }
        }
    }
    while (q--) {
        int x, y;
        cin >> x >> y;
        int pref_a = 0;
        int i = 0;
        while (a[i].second + pref_a < x) {
            pref_a += a[i].second;
            i++;
        }
        int val_a = a[i].second;
        a[i].second = a[i].second + pref_a - x;

        int pref_b = 0;
        int j = 0;
        while (b[j].second + pref_b < y) {
            pref_b += b[j].second;
            j++;
        }
        int val_b = b[j].second;
        b[j].second = b[j].second + pref_b - y;
        if (dfs(i, j)) {
            cout << "Yes\n";
        } else {
            cout << "No\n";
        }
        a[i].second = val_a;
        b[j].second = val_b;
    }

}

signed main() {
    int t = 1;
    //cin >> t;
    while (t--) {
        sovel();
    }
}
