#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <algorithm>

using namespace std;

typedef long long ll;
typedef long double ld;

const ll inf = 1e18;
const ll mod = 1e9 + 7;
const ll c = ll(1e6) + 1;

void solve() {
    ll n1, n2, m1, m2, k, q;
    cin >> n1 >> n2 >> m1 >> m2 >> k >> q;
    vector<pair<ll, ll>> v1(n2);
    vector<pair<ll, ll>> v2(m2);
    for (int i = 0; i < n2; i++) cin >> v1[i].first >> v1[i].second;
    for (int i = 0; i < m2; i++) cin >> v2[i].first >> v2[i].second;
    vector<ll> a1;
    vector<ll> a2;
    for (int i = 0; i < n2; i++) {
        for (int j = 0; j < v1[i].first; j++) a1.push_back(v1[i].second);
    }
    for (int i = 0; i < m2; i++) {
        for (int j = 0; j < v2[i].first; j++) a2.push_back(v2[i].second);
    }
    vector<vector<ll>> dp(n1, vector<ll>(m1));
    vector<vector<ll>> ind1(n1 + 1);
    vector<vector<ll>> ind2(n1 + 1);
    for (int i = 0; i < n1; i++) ind1[a1[i]].push_back(i);
    for (int i = 0; i < m1; i++) ind2[a2[i]].push_back(i);
    for (int i = 0; i < n1 + 1; i++) {
        if (ind1[i].size() != 0) {
            for (int j = 0; j < m1; j++) {
                dp[ind1[i].back()][j] = 1;
            }
        }
        if (ind2[i].size() != 0) {
            for (int j = 0; j < n1; j++) {
                dp[j][ind2[i].back()] = 1;
            }
        }
    }
    for (int i = n1 - 1; i >= 0; i--) {
        for (int j = m1 - 1; j >= 0; j--) {
            for (int now = 0; now < n1 + 1; now++) {
                auto it1 = upper_bound(ind1[now].begin(), ind1[now].end(), i);
                auto it2 = upper_bound(ind2[now].begin(), ind2[now].end(), j);
                if (it1 != ind1[now].end() && it2 != ind2[now].end()) {
                    ll i1 = (*it1), j1 = (*it2);
                    if (dp[i1][j1] == 0) dp[i][j] = 1;
                }
            }
        }
    }
    for (int i1 = 0; i1 < q; i1++) {
        ll x, y;
        cin >> x >> y;
        if (dp[x][y] == 0) {
            cout << "No\n";
        } else {
            cout << "Yes\n";
        }
    }
}

int main() {
#ifdef KABANDJAN
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll t = 1;
//    cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}
