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

using namespace __gnu_pbds;
using namespace std;

#define fi first
#define se second
#define for0(i, n) for (ll i = 0; i < n; i++)
#define for1(i, n) for (ll i = 1; i < n; i++)
#define con continue
#define ret return
#define pb push_back
#define sz(x) x.size()
#define pob pop_back
#define be(x) x.begin()
#define en(x) x.end()
#define all(x) be(x), en(x)
#define rfor0(i, n) for (ll i = n - 1; i >= 0; i--)
#define rfor1(i, n) for (ll i = n - 1; i >= 1; i--)
#define rep(i, a, n) for (ll i = a; i < n; i++)
#define endl '\n'
#define rev reverse
#define co count
#define lb lower_bound
#define ub upper_bound
#define bs binary_search
#define rs resize
#define rsun(x) x.rs(unique(all(x)) - be(x))
#define ins insert
#ifdef OG_Matveychick1
bool local = 1;
#else
bool local = 0;
#endif


typedef long long ll;
typedef vector<ll> vll;
typedef pair<ll, ll> pll;
typedef string str;
typedef vector<pll> vpll;
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef set<ll> sll;
typedef queue<ll> qll;
typedef vector<vector<ll>> vvll;
typedef set<pll> spll;
typedef vector<str> vs;
typedef long double ld;
typedef vector<vpll> vvpll;
typedef multiset<ll> msll;
typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> orderes_set;
typedef tree<ll, null_type, less_equal<ll>, rb_tree_tag, tree_order_statistics_node_update> orderes_multiset;

template<typename T>
istream &operator>>(istream &in, vector<T> &a) {
    for (auto &x: a) in >> x;
    ret in;
}

template<typename T1, typename T2>
istream &operator>>(istream &in, pair<T1, T2> &a) {
    in >> a.first >> a.second;
    ret in;
}

template<typename T1, typename T2>
ostream &operator<<(ostream &out, pair<T1, T2> &a) {
    out << a.first << ' ' << a.second << endl;
    ret out;
}

template<typename T>
ostream &operator<<(ostream &out, vector<T> &a) {
    for (auto &x: a) out << x << ' ';
    ret out;
}

template<typename T1, typename T2>
T1 min(T1 a, T2 b) {
    ret min(a, (T1) b);
}

template<typename T1, typename T2>
T1 max(T1 a, T2 b) {
    ret max(a, (T1) b);
}

template<typename T1, typename T2>
void amin(T1 &a, T2 b) {
    a = min(a, (T1) b);
}

template<typename T1, typename T2>
void amax(T1 &a, T2 b) {
    a = max(a, (T1) b);
}

void solve();

ld getTime() {
    ret (ld) clock() / CLOCKS_PER_SEC;
}

mt19937_64 rn(chrono::steady_clock::now().time_since_epoch().count());

ll rnd(ll l, ll r) {
    ret rn() % (r - l) + l;
}

signed main(int argc, char *argv[]) {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    cout.precision(12);
    cout << fixed;
    if (local && argc == 1) {
        freopen("input.txt", "r", stdin);
    }
    ll T = 1;
//    cin >> T;
    while (T--) {
        solve();
    }
    if (local && argc == 1) {
        cout << endl << getTime();
    }
}


const ll C = 1605;

ll N, n, M, m, k, q, dp[C][C][2], mn[C], u1[C], sm[C], sa[C];
pll a[C], b[C];

void solve() {
    cin >> N >> n >> M >> m >> k >> q;
    for0(i, k) mn[i] = 1e18;
    for0(i, n) cin >> a[i].fi >> a[i].se, a[i].se--, amin(mn[a[i].se], a[i].fi), sa[a[i].se] += a[i].fi;
    for0(i, m) cin >> b[i].fi >> b[i].se, b[i].se--, sm[b[i].se] += b[i].fi;
    for0(i, k) amin(mn[i], sm[i]);
    rfor0(i, n) {
        for0(j, k) sm[j] = 0;
        bool fl = 0;
        rfor0(j, m) {
            sm[b[j].se] += b[j].fi;
            if (u1[b[j].se] && dp[b[j].se][j][1 - (min(sa[b[j].se], sm[b[j].se]) & 1)] == 0) fl = 1;
            if (b[j].se == a[i].se) {
                dp[a[i].se][j][1] = 1;
                dp[a[i].se][j][0] = fl;
            }
        }
        u1[a[i].se] = 1;
    }
    while (q--) {
        ll x, y;
        cin >> x >> y;
        ll cl, o1, o2;
        for0(i, n) {
            if (x < a[i].fi) {
                cl = a[i].se, o1 = a[i].fi - x;
                break;
            } else x -= a[i].fi;
        }
        ll j1 = 0;
        ll cnt = sm[cl];
        for0(j, m) {
            if (y < b[j].fi) {
                cnt -= y;
                o2 = b[j].fi - y;
                j1 = j;
                break;
            } else y -= b[j].fi, cnt -= (b[j].se == cl ? b[j].fi : 0);
        }
        o2 = cnt;
        ll o = min(o1, o2) & 1;
        cout << (dp[cl][j1][o] ? "Yes" : "No") << endl;
    }
}