#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <unordered_map>
#include <set>
#include <string>
//#define endl '\n'
//#define int long long

using namespace std;

map<pair<pair<int, int>, pair<int, int>>, int> dp;
vector<pair<int, int>> a, b;

void cur(int i, int j, int c1, int c2) {
    if (i == (int)a.size() - 1 && c1 == a[i].first - 1 || j == (int)b.size() - 1 && c2 == b[j].first - 1) {
        dp[{{i, c1},{j, c2}}] = false;
        return;
    }
    if (dp.find({{i, c1},{j, c2}}) != dp.end()) {
        return;
    }
    map<int, pair<int, int>> ind1, ind2;
    int sz = min(a[i].first - c1 - 1, b[j].first - c2 - 1);
    if (sz % 2 == 0) {
        sz--;
    }
    if (sz > 0) {
        ind1[a[i].second] = {i, c1 + sz};
        ind2[b[j].second] = {j, c2 + sz};
    } else {
        if (c1 != a[i].first - 1) {
            ind1[a[i].second] = {i, c1 + 1};
        }
        if (c2 != b[j].first - 1) {
            ind2[b[j].second] = {j, c2 + 1};
        }
    }
    for (int x = i + 1; x < (int)a.size(); ++x) {
        if (ind1.find(a[x].second) == ind1.end()) {
            ind1[a[x].second] = {x, 0};
        }
    }
    for (int x = j + 1; x < (int)b.size(); ++x) {
        if (ind2.find(b[x].second) == ind2.end()) {
            ind2[b[x].second] = {x, 0};
        }
    }
    bool found = false;
    for (auto it = ind1.begin(); it != ind1.end(); ++it) {
        int numb = (it -> first);
        pair<int, int> g1 = (it -> second);
        if (ind2.find(numb) != ind2.end()) {
            pair<int, int> g2 = ind2[numb];
            cur(g1.first, g2.first, g1.second, g2.second);
            if (!dp[{g1, g2}]) {
                found = true;
            }
        }
    }
    dp[{{i, c1}, {j, c2}}] = found;
}

int solve(vector<pair<int, int>> q, vector<pair<int, int>> w, int l, int r) {
    a.clear();
    b.clear();
    vector<pair<int, int>> c, d;
    int z = 0;
    while (z < (int)q.size()) {
        int x = min(l, q[z].first);
        l -= x;
        q[z].first -= x;
        if (q[z].first > 0) {
            c.push_back(q[z]);
        }
        z++;
    }
    z = 0;
    while (z < (int)w.size()) {
        int x = min(r, w[z].first);
        r -= x;
        w[z].first -= x;
        if (w[z].first > 0) {
            d.push_back(w[z]);
        }
        z++;
    }
    a = c;
    b = d;
    dp.clear();
    cur(0, 0, -1, -1);
    if (dp[{{0, -1}, {0, -1}}]) {
        return 1;
    } else {
        return 0;
    }
}

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int n, m, k, q;
    cin >> n >> n >> m >> m >> k >> q;
    vector<pair<int, int>> aa, bb;
    int l, v;
    for (int i = 0; i < n; ++i) {
        cin >> l >> v;
        aa.push_back({l, v});
    }
    for (int i = 0; i < m; ++i) {
        cin >> l >> v;
        bb.push_back({l, v});
    }
    map<pair<int, int>, int> be;
    for (int i = 0; i < q; ++i) {
        cin >> l >> v;
        if (be.find({l, v}) == be.end()) {
            be[{l, v}] = solve(aa, bb, l, v);
        }
        if (be[{l, v}]) {
            cout << "Yes" << endl;
        } else {
             cout << "No" << endl;
         }
    }
    return 0;
}
