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

using namespace std;
using ll = long long;
using namespace __gnu_pbds;
using ordered_set = tree<ll, null_type, less_equal < ll>, rb_tree_tag, tree_order_statistics_node_update>;

int main() {
    int N, n, M, m, k, q;
    cin >> N >> n >> M >> m >> k >> q;
    vector<pair<int, int> > ln(k + 1);
    vector<pair<int, int> > lm(k + 1);
    int ps = 0;
    for (int i = 0; i < n; i++) {
        int x, y;
        cin >> x >> y;
        ln[y] = {ps, ps + x};
        ps += x;
    }
    ps = 0;
    for (int i = 0; i < m; i++) {
        int x, y;
        cin >> x >> y;
        lm[y] = {ps, ps + x};
        ps += x;
    }
    while (q--) {
        bool flag = false;
        int x, y;
        cin >> x >> y;
        for (int i = 1; i <= k; i++) {
            int z = min(ln[i].second - max(ln[i].first, x), lm[i].second - max(lm[i].first, y));
            if (z > 0 && z % 2 != 0) {
                flag = true;
                break;
            }
        }
        if (flag) {
            cout << "Yes";
        } else {
            cout << "No";
        }
        cout << endl;
    }
    return 0;
}
