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

void solve() {
    int N, n, M, m, k, q; cin >> N >> n >> M >> m >> k >> q;
    vector <pair <int, int>> a, b;
    int fl = 0;
    for (int i = 0; i < n; i++) {
        int l, v; cin >> l >> v;
        if (v != 1) fl = 1;
        a.emplace_back(l, v);
    }
    for (int i = 0; i < m; i++) {
        int l, v; cin >> l >> v;
        if (v != 1) fl = 1;
        b.emplace_back(l, v);
    }
    if (!fl) {
        for (int i = 0; i < q; i++) {
            int x, y; cin >> x >> y;
            int new_n = N - x;
            int new_m = M - y;
            cout << (min(new_n, new_m) % 2 == 1 ? "Yes" : "No") << endl;
        }
        return;
    }
    for (int i = 0; i < q; i++) {
        int x, y; cin >> x >> y;
        int new_n = N - x;
        int new_m = M - y;
        cout << "Yes" << endl;
    }
}

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int test = 1;
    for (int i = 0; i < test; i++) {
        solve();
    }
}