
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;


signed main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    int N, n, M, m, k, q;
    cin >> N >> n >> M >> m >> k >> q;
    vector<pair<int, int>> aa(n), bb(m);
    for (int i = 0; i < n; i++) {
        cin >> aa[i].first >> aa[i].second;
    }
    for (int i = 0; i < m; i++){
        cin >> bb[i].first >> bb[i].second;
    }

    while (q--){
        int x0, y0;
        cin >> x0 >> y0;
        vector<pair<int, int>> a, b;
        for (int i = 0; i < n; i++){
            if (x0 >= aa[i].first){
                x0 -= aa[i].first;
            } else {
                a.push_back({aa[i].first - x0, aa[i].second});
                x0 = 0;
            }
        }
        for (int i = 0; i < m; i++){
            if (y0 >= bb[i].first){
                y0 -= bb[i].first;
            } else {
                b.push_back({bb[i].first - y0, bb[i].second});
                y0 = 0;
            }
        }
        vector<pair<int, int>> cnt(k + 1);
        for (int i = 0; i < a.size(); i++){
            cnt[a[i].second].first += a[i].first;
        }
        for (int i = 0; i < b.size(); i++){
            cnt[b[i].second].second += b[i].first;
        }
        bool f = false;
        for (int i = 0 ;i <= k; i++){
            if (min(cnt[i].first, cnt[i].second) % 2 == 1){
                cout << "Yes\n";
                f = true;
                break;
            }
        }
        if (!f){
            cout << "No\n";
        }

    }
}
/*
6 6
1 1 1 4 5
2 3 4 5 6 1
1 2 3 4 5 6
 */