//#pragma GCC optimize("O2")
//#pragma GCC optimize("unroll-loops")
//#pragma GCC target("avx2")
//#pragma GCC target("popcnt") 1's count

#include <vector>
#include <iostream>
#include <fstream>
#include <algorithm>
#include <string>
#include <map>
#include <unordered_map>
#include <cmath>
#include <string>
#include <queue>
#include <set>
#include <unordered_set>
#include <climits> //INT_MAX, LLONG_MAX
#include <random> //mt19937
#include <numeric> //gcd
#include <bitset>

using namespace std;
using ll = long long;
using ull = unsigned long long;
using uint = unsigned int;
using db = double;
//#define int long long

constexpr ll inf = 2e18;

void sol() {
    int N, n, M, m, k, q, l, v, x, y;
    cin >> N >> n >> M >> m >> k >> q;
    vector <pair <int, int>> va(n), vb(m);
    vector <int> vanum(n), vbnum(m);
    vector <pair <int, int>> vka(k + 1, {-1, -1}), vkb(k + 1, {-1, -1});
    vector <pair <int, int>> vkacet(k + 1, {-1, -1}), vkbcet(k + 1, {-1, -1});
    int pos = 1;
    for (int i = 0; i < n; i++) {
        cin >> l >> v;
        va[i] = {l, v};
        vanum[i] = pos;
        vka[v] = {pos, l};
        if (l % 2 == 0) {
            vkacet[v] = {pos, l};
        }
        pos += l;
    }
    pos = 1;
    for (int i = 0; i < m; i++) {
        cin >> l >> v;
        vb[i] = {l, v};
        vbnum[i] = pos;
        if (l % 2 || vkb[v].first == -1 || (vkb[v].second % 2 == 0)) {
            vkb[v] = {pos, l};
        }
        if (l % 2 == 0) {
            vkbcet[v] = {pos, l};
        }
        pos += l;
    }
    while (q--) {
        cin >> x >> y;
        bool flag = false;
        for (int i = 0; i <= k; i++) {
            if (vka[i].first == -1 || vkb[i].second == -1) {
                continue;
            }
            if (vka[i].first + vka[i].second - 1 <= x || vkb[i].first + vkb[i].second - 1 <= y) {
                continue;
            }
            int ln = min(min(vka[i].second, vka[i].first + vka[i].second - 1 - x),
                         min(vkb[i].second, vkb[i].first + vkb[i].second - 1 - y));
            if (ln % 2) {
                cout << "Yes\n";
                flag = true;
                break;
            }
        }
        if (flag) {
            continue;
        }
        int num1 = lower_bound(vanum.begin(), vanum.end(), x + 1) - vanum.begin();
        if (num1 == n || vanum[num1] != x + 1) {
            num1--;
        }
        int num2 = lower_bound(vbnum.begin(), vbnum.end(), y + 1) - vbnum.begin();
        if (num2 == m || vbnum[num2] != y + 1) {
            num2--;
        }
        if (vkb[num2].first > x && vkb[num2].second % 2 == 0) {

        }
        int ln = min(vanum[num1] + va[num1].first - 1 - x, vbnum[num2] + vb[num2].first - 1 - y);
        int el = va[num1].second;
        if (ln % 2) {
            if (vkacet[el].first != -1 && vkacet[el].first > x && vkbcet[el].first != -1 && vkbcet[el].first >= y) {
                cout << "No\n";
                continue;
            }
            cout << "Yes\n";
            continue;
        }
        cout << "No\n";
    }
}

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
//    cout.precision(15);

    int T = 1;
    //cin >> T;
    while (T--) {
        sol();
    }
}

//5 1 5 1 1 9
//5 1
//5 1
//0 0
//0 1
//0 2
//1 0
//1 1
//1 2
//2 0
//2 1
//2 2