#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

int main() {
#ifdef DEBUG_Q
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    ll N, n, M, m, k, q;
    cin >> N >> n >> M >> m >> k >> q;
    vector<ll> la(n), a(n);
    for (ll i = 0; i < n; i++) {
        cin >> la[i] >> a[i];
        a[i]--;
    }
    vector<ll> lb(n), b(n);
    for (ll i = 0; i < m; i++) {
        cin >> lb[i] >> b[i];
        b[i]--;
    }
    vector<vector<bool>> dp(n, vector<bool>(m));
    vector<ll> last(k, -1);
    vector<ll> gg(k, 1);
    ll sum = k;
    for (ll i = n - 1; i >= 0; i--) {
        for (ll j = m - 1; j >= 0; j--) {
            if (sum < k) {
                dp[i][j] = true;
            } else {
                dp[i][j] = min(la[i], lb[j]) % 2 == 0;
            }
            dp[i][j] = sum < k;
            if (last[b[j]] != -1) {
                sum -= gg[b[j]];
                gg[b[j]] = dp[last[b[j]]][j];
                sum += gg[b[j]];
            }
        }
        last[a[i]] = i;
        gg.assign(k, 1);
        sum = k;
    }
    vector<vector<bool>> ans(n, vector<bool>(m));
    last.assign(k, -1);
    for (ll i = n - 1; i >= 0; i--) {
        last[a[i]] = i;
        gg.assign(k, 1);
        sum = k;
        for (ll j = m - 1; j >= 0; j--) {
            if (last[b[j]] != -1) {
                sum -= gg[b[j]];
                gg[b[j]] = dp[last[b[j]]][j];
                sum += gg[b[j]];
            }
            ans[i][j] = sum < k;
        }
    }

    vector<ll> pa(n + 1);
    for (ll i = 1; i <= n; i++) {
        pa[i] = pa[i - 1] + la[i - 1];
    }
    vector<ll> pb(n + 1);
    for (ll i = 1; i <= m; i++) {
        pb[i] = pb[i - 1] + lb[i - 1];
    }

    while (q--) {
        ll x, y;
        cin >> x >> y;
        ll i = upper_bound(pa.begin(), pa.end(), x) - pa.begin() - 1;
        ll j = upper_bound(pb.begin(), pb.end(), y) - pb.begin() - 1;
        bool aye = i + 1 < n && j + 1 < m && ans[i + 1][j + 1];
        if (aye) {
            cout << "Yes\n";
        } else {
            ll ca = pa[i + 1] - x;
            ll cb = pb[j + 1] - y;
            if (min(ca, cb) % 2 == 1) {
                cout << "Yes\n";
            } else {
                cout << "No\n";
            }
        }
    }
}