#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef __int128 lll;
const ll inf = 2e18, mod = 1e9 + 7;

#define all(a) a.begin(),a.end()
#define F first
#define S second

ll N,n,M,m,k,q;

vector<ll>la,va,lb,vb;
vector<vector<ll>>ax,bx;

vector<vector<ll>>ain,aout;

void f(ll i,ll j){
    if(ain[i][j]!=-1)
        return;
    ll w=0;
    for(ll it=i+1;it<n;it++){
        ll jt;
        if(it>i&&0)
            jt=lower_bound(all(bx[va[it]]),j)-bx[va[it]].begin();
        else
            jt=upper_bound(all(bx[va[it]]),j)-bx[va[it]].begin();
        if(jt!=bx[va[it]].size()){
            jt=bx[va[it]][jt];
            f(it,jt);
            if(ain[it][jt]){
                w=1;
                break;
            }
        }
    }
    aout[i][j]=w;
    if(min(la[i],lb[j])%2==0)
        ain[i][j]=w;
    else
        ain[i][j]=1;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    ifstream in("C:\\work\\untitled\\input.txt");

    cin>>N>>n>>M>>m>>k>>q;
    la.resize(n);
    va.resize(n);
    ax.resize(k+1);
    vector<ll>prla(n);
    for(ll i=0;i<n;i++){
        cin>>la[i]>>va[i];
        prla[i]=la[i];
        if(i)
            prla[i]+=prla[i-1];
        ax[va[i]].push_back(i);
    }

    lb.resize(m);
    vb.resize(m);
    bx.resize(k+1);
    vector<ll>prlb(m);
    for(ll i=0;i<m;i++){
        cin>>lb[i]>>vb[i];
        prlb[i]=lb[i];
        if(i)
            prlb[i]+=prlb[i-1];
        bx[vb[i]].push_back(i);
    }

    ain.resize(n,vector<ll>(m,-1));
    aout.resize(n,vector<ll>(m,-1));

    while(q--){
        ll x,y;cin>>x>>y;
        ll i= upper_bound(all(prla),x)-prla.begin();
        ll j= upper_bound(all(prlb),y)-prlb.begin();
        f(i,j);
        if(i)
            x-=prla[i-1];
        if(j)
            y-=prlb[j-1];
        if(aout[i][j]||min(la[i]-x,lb[j]-y)%2)
            cout<<"Yes\n";
        else
            cout<<"No\n";
    }
}
