#include <bits/stdc++.h>

using namespace std;

int n, b1, m, b2, k, q;
vector<vector<int>> to1, to2;
vector<vector<int>> mp;

bool get(int x, int y) {
    if (x >= n || y >= m) return false;
    if (x >= 0 && y >= 0 && mp[x][y] != -1) return mp[x][y];
    int xx = max(x, 0), yy = max(y, 0);
    for (int i = 1; i < k; i++) {
        if (to1[xx][i] != n && to2[yy][i] != m && !get(to1[xx][i] + 1, to2[yy][i] + 1)) {
            if (x >= 0 && y >= 0) mp[x][y] = true;
            return true;
        }
    }
    int t1, t2;
    if (x < 0) t1 = x;
    else t1 = to1[x][0];
    if (y < 0) t2 = y;
    else t2 = to2[y][0];
    if (t1 != n && t2 != m && !get(t1 + 1, t2 + 1)) {
        if (x >= 0 && y >= 0) return mp[x][y] = true;
        return true;
    }
    if (x >= 0 && y >= 0) return mp[x][y] = false;
    return false;
}

int main() {
//    ios::sync_with_stdio(false);
//    cin.tie(nullptr);
    cin >> n >> b1 >> m >> b2 >> k >> q;
    vector<int> vec1, vec2;
    vector<int> allx;
    b1--;
    int trash;
    int l1, l2;
    cin >> l1 >> trash;
    while (b1--) {
        int l, v;
        cin >> l >> v;
        vec1.resize(vec1.size() + l, --v);
        allx.push_back(v);
    }
    --b2;
    cin >> l2 >> trash;
    while (b2--) {
        int l, v;
        cin >> l >> v;
        vec2.resize(vec2.size() + l, --v);
        allx.push_back(v);
    }
    sort(allx.begin(), allx.end());
    allx.erase(unique(allx.begin(), allx.end()), allx.end());
    k = allx.size();
    for (auto &elem : vec1)
        elem = lower_bound(allx.begin(), allx.end(), elem) - allx.begin();
    for (auto &elem : vec2)
        elem = lower_bound(allx.begin(), allx.end(), elem) - allx.begin();
    n -= l1, m -= l2;
    to1.resize(n + 1, vector<int> (k, n));
    for (int i = n - 1; i >= 0; i--) {
        to1[i] = to1[i + 1];
        to1[i][vec1[i]] = i;
    }
    to2.resize(m + 1, vector<int> (k, m));
    for (int i = m - 1; i >= 0; i--) {
        to2[i] = to2[i + 1];
        to2[i][vec2[i]] = i;
    }
    mp.assign(n, vector<int> (m, -1));
    while (q--) {
        int x, y;
        cin >> x >> y;
        x -= l1, y -= l2;
        if (x < 0 && y < 0) {
            int add = min(-x, -y);
            add -= add & 1;
            x += add, y += add;
        }
        if (y > 0)
            x = max(-1000, x);
        if (x > 0)
            y = max(-1000, y);
        if (get(x, y)) cout << "Yes\n";
        else cout << "No\n";
    }
}
