#include <iostream>
#include <vector>
#include <set>
#include <algorithm>
#include <cmath>
#include <random>
#include <map>
#include <queue>

using namespace std;
using ll = long long;

signed main() {
	cin.tie(0);
	ios::sync_with_stdio(0);

	int N, n, M, m, k, q;
	cin >> N >> n >> M >> m >> k >> q;
	vector<int> la(n), va(n), lb(m), vb(m);
	vector<int> ia(k + 1, -1), ib(k + 1, -1);
	for (int i = 0; i < n; ++i) {
		cin >> la[i] >> va[i];
		ia[va[i]] = i;
	}
	for (int i = 0; i < m; ++i) {
		cin >> lb[i] >> vb[i];
		ib[vb[i]] = i;
	}
	vector<vector<int>> cn(n + 1, vector<int> (m + 1));
	for (int i = n - 1; i >= 0; --i) {
		for (int j = m - 1; j >= 0; --j) {
			cn[i][j] = cn[i + 1][j + 1];
			if (va[i] == vb[j]) {
				cn[i][j] += min(la[i], lb[j]) % 2;
			}
			else {
				if (ib[va[i]] >= j) {
					cn[i][j] += min(la[i], lb[ib[va[i]]]) % 2;
				}
				if (ia[vb[j]] >= i) {
					cn[i][j] += min(lb[ia[vb[j]]], lb[j]) % 2;
				}
			}
		}
	}
	vector<int> pa(n + 1);
	vector<int> pb(n + 1);
	for (int i = 0; i < n; ++i) {
		pa[i + 1] = pa[i] + la[i];
	}
	for (int i = 0; i < m; ++i) {
		pb[i + 1] = pb[i] + lb[i];
	}
	for (int i = 0; i < q; ++i) {
		int x, y;
		cin >> x >> y;
		int i1 = upper_bound(pa.begin(), pa.end(), x) - pa.begin() - 1;
		int i2 = upper_bound(pb.begin(), pb.end(), y) - pb.begin() - 1;
		if (cn[i1 + 1][i2 + 1] > 0) {
			cout << "Yes\n";
		} else if (va[i1] == vb[i2]) {
			if (min(pa[i1 + 1] - x, pb[i2 + 1] - y) % 2) {
				cout << "Yes\n";
			}
			else {
				cout << "No\n";
			}
		}
		else {
			if (ib[va[i1]] > i2) {
				if (min(pa[i1 + 1] - x, lb[ib[va[i1]]]) % 2) {
					cout << "Yes\n";
					continue;
				}
			}
			if (ia[vb[i2]] > i1)  {
				if (min(la[ia[vb[i2]]], pb[i2 + 1] - y) % 2) {
					cout << "Yes\n";
					continue;
				}
			}
			cout << "No\n";
		}
	}
	return 0;
}
