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

using namespace std;
using namespace __gnu_pbds;

using ll = long long;
using ld = long double;

#define all(a) a.begin(), a.end()

using ordered_set = tree<int, null_type, less<>, rb_tree_tag, tree_order_statistics_node_update>;

void solve();

signed main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
#ifdef _GLIBCXX_DEBUG
    freopen("input", "r", stdin);
#endif
    int t = 1;
    //cin >> t;
    while (t--)
        solve();
}

void solve() {
    int N, n, M, m, k, q;
    cin >> N >> n >> M >> m >> k >> q;
    vector<pair<int, int>> a, b;
    map<int, pair<int, int>> x;
    int p = 0;
    for (int i = 0; i < n; i++) {
        int l, v;
        cin >> l >> v;
        a.push_back({p, v});
        x[v].first = p;
        p += l;
    }
    p = 0;
    for (int i = 0; i < m; i++) {
        int l, v;
        cin >> l >> v;
        b.push_back({p, v});
        x[v].second = p;
        p += l;
    }
    b.push_back({M, 0});
    a.push_back({N, 0});
    vector<pair<int, int>> go;
    for (auto [_, p]: x) {
        if (p.first != -1 && p.second != -1)
            go.push_back(p);
    }
    sort(all(go));
    reverse(all(go));
    int lst = -1, is = 0;
    for (auto [l, r]: go) {
        int len1 = lower_bound(all(a), make_pair(l + 1, 0))->first - l;
        int len2 = lower_bound(all(b), make_pair(r + 1, 0))->first - r;
        if (min(len1, len2) % 2 == 1 || is == 1) {
            lst = l;
            break;
        }
        is = 1;
    }
    while (q--) {
        int x, y;
        cin >> x >> y;
        int len1 = lower_bound(all(a), make_pair(x + 1, 0))->first - x;
        int len2 = lower_bound(all(b), make_pair(y + 1, 0))->first - y;
        if (lst > x || min(len1, len2) % 2 == 1)
            cout << "Yes\n";
        else
            cout << "No\n";
    }
}