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

using namespace std;
using namespace __gnu_pbds;

//#define int long long
using ll = long long;

typedef tree<int, null_type, less<>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
const int inf = 1e9 + 7;
const ll inf_ = 1e18 + 7;
const int mod = 998244353;

struct Hash {
    int mod2 = 1e9 + 7, p2 = 239;

    int sum(int a, int b) {
        a += b;
        if (a >= mod2) a -= mod2;
        return a;
    }

    int sub(int a, int b) {
        a -= b;
        if (a < 0) a += mod2;
        return a;
    }

    int mul(int a, int b) {
        return a * 1ll * b % mod2;
    }

    vector<int> h, pr;

    Hash(string s) {
        int n = s.size();
        h.resize(n);
        pr.resize(n + 1);
        h[0] = s[0];
        pr[0] = 1;
        for (int i = 1; i < n; i++)
            h[i] = sum(s[i], mul(h[i - 1], p2));
        for (int i = 1; i <= n; i++)
            pr[i] = mul(pr[i], p2);
    }

    int get(int l, int r) {
        return 0;
    }
};

struct Fast {
    void solve() {
        int N, n, M, m, k, q;
        cin >> N >> n >> M >> m >> k >> q;
        vector<pair<int, int>> a(n), b(m);
        for (auto &[x, y]: a) cin >> x >> y, y--;
        for (auto &[x, y]: b) cin >> x >> y, y--;
        vector<vector<int>> dp(n, vector<int>(m, -1));
        vector<int> to_a(k, n), to_b(k, m);
        vector<int> sz_a(k), sz_b(k);
        auto dp2 = dp;
        for (int i = n - 1; i >= 0; i--) {
            to_b.assign(k, m);
            for (int j = m - 1; j >= 0; j--) {
                if (b[j].second != a[i].second) continue;
                for (int to = 0; to < k; to++) {
                    if (a[i].second == to) continue;
                    if (to_a[to] == n || to_b[to] == m)
                        continue;
                    if (dp[to_a[to]][to_b[to]] == 0) {
                        dp[i][j] = 1;
                        break;
                    }
                }
                dp2[i][j] = dp[i][j];
                if (dp[i][j] != 1) {
                    int to = a[i].second;
                    int sz = min(a[i].first, b[j].first);
                    if (sz % 2) {
                        if (to_a[to] == n || to_b[to] == m || !dp[to_a[to]][to_b[to]])
                            dp[i][j] = 1;
                        else dp[i][j] = 0;
                    } else {
                        if (to_a[to] == n || to_b[to] == m || !dp[to_a[to]][to_b[to]])
                            dp[i][j] = 0;
                        else dp[i][j] = 1;
                    }
                }
                to_b[b[j].second] = j;
                sz_b[b[j].second] += b[j].first;
            }
            to_a[a[i].second] = i;
            sz_a[a[i].second] += a[i].first;
        }
        vector<int> da, db;
        for (int i = 0; i < n; i++)
            da.emplace_back(a[i].first);
        for (int i = 0; i < m; i++)
            db.emplace_back(b[i].first);
        for (int i = 1; i < n; i++)
            da[i] += da[i - 1];
        for (int i = 1; i < m; i++)
            db[i] += db[i - 1];
        while (q--) {
            int x, y;
            cin >> x >> y;
            int i = upper_bound(da.begin(), da.end(), x) - da.begin();
            int j = upper_bound(db.begin(), db.end(), x) - db.begin();
            if (dp2[i][j] == 1) cout << "Yes\n";
            else {
                int to = a[i].second;
                int sz = min(da[i] - x, db[j] - y);
                int c = dp[i][j];
                if (sz % 2 == 0)
                    c = !dp[i][j];
                if (c) cout << "Yes\n";
                else cout << "No\n";
            }
        }
    }
};

signed main() {
    int __ = 1;
    // cin>>__;
    while (__--) {
        Fast().solve();
        cout << '\n';
    }
    return 0;
}
