#include <bits/stdc++.h>

using namespace std;

void solve();

//#pragma GCC optimize("O3","Ofast","fastmath","unroll-loops")
//#pragma GCC target("avx2","sse4.2","bmi","lzcnt","popcnt")
int main() {
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
#endif
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    int t = 1;
   // cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}

#define int long long
#define endl '\n'
const int N = 200 + 1, INF = 2e9, MOD = 1e9 + 7;

void solve() {
    int nb,n,mb,m,k,q;
    cin>>nb>>n>>mb>>m>>k>>q;
    vector<pair<int,int>> a(n),b(m);
    vector<int> pa(n),pb(n);
    int ca=0,cb=0;
    map<int,int> pos,cnt;
    for(int i=0;i<n;i++){
        cin>>a[i].first>>a[i].second;
        ca+=a[i].first;
        pa[i]=ca;
    }
    for(int i=0;i<m;i++){
        cin>>b[i].first>>b[i].second;
        cb+=b[i].first;
        pb[i]=cb;
        pos[b[i].second]=pb[i];
        cnt[b[i].second]=b[i].first;
    }

    while(q--){
        int x,y;
        cin>>x>>y;
        int ap=upper_bound(pa.begin(),pa.end(),x)-pa.begin();
        int bp=upper_bound(pb.begin(),pb.end(),y)-pb.begin();
        if(ap>=n || bp>=m)assert(0);
        int cnta=pa[ap]-x,cntb=pb[bp]-y;
        if(a[ap].second==b[bp].second){
            if(min(cnta,cntb)%2==1){
                cout<<"Yes"<<endl;
            }else{
                cout<<"No"<<endl;
            }
        }else{
            if(pos[a[ap].second]<=y){
                cout<<"Yes"<<endl;
            }else{
                cntb=cnt[a[ap].second];
                if(min(cnta,cntb)%2==1){
                    cout<<"Yes"<<endl;
                }else{
                    cout<<"No"<<endl;
                }
            }
        }
    }

}