#include <bits/stdc++.h>

#define ff first
#define ss second
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()

using namespace std;
//using namespace __gnu_pbds;

typedef long long ll;
typedef long double ld;
mt19937_64 gen;
const ll mod = 1e9 + 7;
const ll INFL = 1e18;
ll binpow(ll a, ll n) {
    if(n == 0) return 1;
    else if(n % 2 == 1) {
        return a * binpow(a, n - 1) % mod;
    } else {
        ll b = binpow(a, n / 2) % mod;
        return b * b % mod;
    }
}
int main()
{
    //seed.time(gen());
    //clock_t start = clock();
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    ll N, n, M, m, k, q; cin >> N >> n >> M >> m >> k >> q;
    vector<ll>a(n + 1), as(n + 1), b(m + 1), bs(m + 1);
    ll mx = 0;
    for(ll i = 0; i < n; i++) {
        ll x, y; cin >> x >> y;
        a[i + 1] = x + a[i];
        as[i + 1] = y;
        mx = max(mx, y);
    }
    for(ll i = 0; i < m; i++) {
        ll x, y; cin >> x >> y;
        b[i + 1] = x + b[i];
        bs[i + 1] = y;
        mx = max(mx, y);
    }

    while(q--) {
        ll x, y; cin >> x >> y;

        auto it = lower_bound(a.begin() + 1, a.end(), x);
        auto it2 = lower_bound(b.begin() + 1, b.end(), y);
        it--;
        it2--;

        //if(*it == x) it++;
        //if(*it2 == y) it2++;
        ll last = x;
        ll pos = it - a.begin();
        vector<pair<ll, ll>>r, r2;
        vector<ll>cnt(mx + 1), cnt2(mx + 1);
        for(ll i = pos; i <= n; i++) {
            if(a[i] <= last) continue;
            r.push_back({as[i], a[i] - last});
            cnt[as[i]]+=(a[i] - last);
            last = a[i];
        }
        pos = it2 - b.begin();
        last = y;
        for(ll i = pos; i <= m; i++) {
            if(b[i] <= last) continue;
            r2.push_back({bs[i], b[i] - last});
            cnt2[bs[i]]+=(b[i] - last);
            last = b[i];
        }

        ll ans = 0;
        bool f = 0;

        for(ll i = 1; i <= mx; i++) {
            ll mn = min(cnt[i], cnt2[i]);
            ll mx = max(cnt[i], cnt2[i]);
            //if(cnt[i] == 0 || cnt2[i] == 0) continue;
            if(mn % 2 != 0) ans++;
            //if(cnt2[i] % 2 != 0) f = 1;
        }

        if(ans % 2 != 0) cout << "Yes\n";
            else cout << "No\n";


    }


    return 0;
}
