#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <deque>
#include <random>
#include <chrono>
using namespace std;
using ll = long long;

mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());

struct str {
    int len, val;
};

int main() {
#ifdef _DEBUG
    freopen("input.txt", "r", stdin);
#endif;
    int cnt_n, n, cnt_m, m, k, q;
    cin >> cnt_n >> n >> cnt_m >> m >> k >> q;
    vector<str> a(n), b(m);
    for (int i = 0; i < n; ++i) {
        cin >> a[i].len >> a[i].val;
    }
    for (int i = 0; i < m; ++i) {
        cin >> b[i].len >> b[i].val;
    }
    while (q--) {
        int x, y;
        cin >> x >> y;
        vector<int> cntb(k + 1);
        int sum = 0;
        for (int i = m - 1; i >= 0; i--) {
            cntb[b[i].val] += max(min(b[i].len, (cnt_m - y) - sum), 0);
            sum += min(b[i].len, (cnt_m - y) - sum);
        }
        sum = 0;
        bool fl = false;
        for (int i = n - 1; i >= 0; i--) {
            if (min(max(min(a[i].len, (cnt_n - x) - sum), 0), cntb[a[i].val]) % 2 == 1)
                fl = true;
            sum += min(a[i].len, (cnt_n - x) - sum);
        }
        if (fl)
            cout << "Yes\n";
        else
            cout << "No\n";
    }
}