//#pragma GCC optimize("O3, Ofast, unroll-loops, inline, no-stack-protector")
#include <bits/stdc++.h>
//#pragma GCC target("avx2")

using namespace std;

using ll = long long;
using pii = pair<int, int>;

unordered_map<int, unordered_map<int, int>> dp;
vector<pii> a, b;
vector<vector<pii>> ax, bx;
int cnt;
int N, M;

int gen(int ptr1, int ptr2) {
    if (ptr1 >= N || ptr2 >= M) return 2;
    if (dp[ptr1][ptr2] != 0) return dp[ptr1][ptr2];
    dp[ptr1][ptr2] = 2;
    for (int i = 0; i < cnt; ++i) {
        if (ax[i].empty() || bx[i].empty()) continue;
        int ida = std::lower_bound(ax[i].begin(), ax[i].end(), (pii) {ptr1, -1}) - ax[i].begin();
        int xa;
        if (ida != ax[i].size()) {
            xa = ax[i][ida].first;
        }
        if (ida != 0) {
            if (ax[i][ida - 1].second > ptr1) {
                xa = ptr1;
            }
        }
        int idb = std::lower_bound(bx[i].begin(), bx[i].end(), (pii) {ptr2, -1}) - bx[i].begin();
        int xb;
        if (idb != bx[i].size()) {
            xb = bx[i][idb].first;
        }
        if (idb != 0) {
            if (ax[i][idb - 1].second > ptr2) {
                xb = ptr2;
            }
        }
        if (gen(xa + 1, xb + 1) == 2) {
            return dp[ptr1][ptr2] = 1;
        }
    }
    return 2;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int n, m, k, q;
    cin >> N >> n >> M >> m >> k >> q;
    a.resize(n);
    b.resize(m);
    vector<int> c;
    for (int i = 0; i < n; ++i) {
        int l, v;
        cin >> l >> v;
        c.push_back(v);
        a[i] = {l, v};
    }
    for (int i = 0; i < m; ++i) {
        int l, v;
        cin >> l >> v;
        c.push_back(v);
        b[i] = {l, v};
    }
    std::sort(c.begin(), c.end());
    c.resize(std::unique(c.begin(), c.end()) - c.begin());
    unordered_map<int, int> mp;
    for (int i = 0; i < c.size(); ++i) {
        mp[c[i]] = i;
    }
    cnt = c.size();
    for (int i = 0; i < n; ++i) a[i].second = mp[a[i].second];
    for (int i = 0; i < m; ++i) b[i].second = mp[b[i].second];
    ax.resize(cnt);
    bx.resize(cnt);
    int ptr = 0;
    for (int i = 0; i < n; ++i) {
        ax[a[i].second].emplace_back(ptr, ptr + a[i].first);
        ptr += a[i].first;
    }
    ptr = 0;
    for (int i = 0; i < m; ++i) {
        bx[b[i].second].emplace_back(ptr, ptr + b[i].first);
        ptr += b[i].first;
    }
    while (q --> 0) {
        int x, y;
        cin >> x >> y;
        if (dp[x][y] == 0) gen(x, y);
        if (dp[x][y] == 1) {
            cout << "Yes\n";
        } else {
            cout << "No\n";
        }
    }
}
