#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <random>
#include <queue>

using namespace std;
using ll = long long;
using ld = long double;
mt19937 rd(328498234);
const ll INF = 1e18;

template<typename T>
struct node {
	int l, r;
	int sz, prior;
	T val;
	node(const T& v = T()) : val(v) {
		sz = 1;
		l = r = -1;
		prior = rd();
	}
};
vector<node<int>> dd;

int getsz(int v) {
	if (v == -1)
		return 0;
	return dd[v].sz;
}

void upd_node(int v) {
	if (v == -1)
		return;

	dd[v].sz = 1;
	if (dd[v].l != -1) {
		dd[v].sz += dd[dd[v].l].sz;
	}
	if (dd[v].r != -1) {
		dd[v].sz += dd[dd[v].r].sz;
	}
}

void push_node(int v) {
	return;
}

int merge(int l, int r) {
	if (l == -1)
		return r;
	if (r == -1)
		return l;
	push_node(l);
	push_node(r);
	if (dd[l].prior < dd[r].prior) {
		dd[r].l = merge(l, dd[r].l);
		upd_node(r);
		return r;
	}
	else {
		dd[l].r = merge(dd[l].r, r);
		upd_node(l);
		return l;
	}
}

pair<int, int> split_sz(int v, int k) { //{<=k, >k}
	if (v == -1)
		return { -1, -1 };
	if (dd[v].sz <= k)
		return { v, -1 };
	if (k <= 0)
		return { -1, v };
	push_node(v);
	if (getsz(dd[v].l) >= k) {
		auto p = split_sz(dd[v].l, k);
		dd[v].l = p.second;
		upd_node(v);
		return { p.first, v };
	}
	else {
		auto p = split_sz(dd[v].r, k - getsz(dd[v].l) - 1);
		dd[v].r = p.first;
		upd_node(v);
		return { v, p.second };
	}
}

pair<int, int> split_val(int v, int val) { // {<=val, >val}
	if (v == -1)
		return { -1, -1 };
	push_node(v);
	if (dd[v].val > val) {
		auto p = split_sz(dd[v].l, val);
		dd[v].l = p.second;
		upd_node(v);
		return { p.first, v };
	}
	else {
		auto p = split_sz(dd[v].r, val);
		dd[v].r = p.first;
		upd_node(v);
		return { v, p.second };
	}
}

int create_node(int val) {
	dd.push_back(val);
	return (int)dd.size() - 1;
}

struct segtree {
	struct node {
		int val;
		node(int val = 0) : val(val) {}
	};

	int sz;
	int ql, qr;
	vector<node> tr;
	vector<int> sizes;
	segtree(int n) {
		sz = 1;
		while (sz < n)
			sz <<= 1;
		tr.assign(sz * 2 - 1, node());
		sizes.assign(sz * 2 - 1, 0);
		sizes[0] = sz;
		for (int i = 1; i < sz * 2 - 1; i++)
			sizes[i] = sizes[(i - 1) / 2] / 2;
		ql = qr = -1;
	}

	void upd(int v) {
		tr[v].val = tr[v * 2 + 1].val + tr[v * 2 + 2].val;
		return;
	}
	void push(int v) {
		return;
	}

	void op_on_seg(int v, int l, int r) {
		if (qr <= l || r <= ql)
			return;
		if (ql <= l && r <= qr) {
			// op
			return;
		}
		push(v);
		op_on_seg(v * 2 + 1, l, (l + r) / 2);
		op_on_seg(v * 2 + 2, (l + r) / 2, r);
		upd(v);
	}

	void get_on_seg(int v, int l, int r) {
		if (qr <= l || r <= ql)
			return;
		if (ql <= l && r <= qr) {
			// get
			return;
		}
		push(v);
		get_on_seg(v * 2 + 1, l, (l + r) / 2);
		get_on_seg(v * 2 + 2, (l + r) / 2, r);
		// merge
		return;
	}
};

void solve() {
	int N, n, M, m, k, t;
	cin >> N >> n >> M >> m;
	cin >> k >> t;

	vector<int> la(n + 1), va(n + 1);
	vector<int> lb(m + 1), vb(m + 1);
	vector<int> pa(n + 1, 0), pb(m + 1, 0);
	for (int i = 1; i <= n; i++) {
		cin >> la[i] >> va[i];
		pa[i] = la[i] + pa[i - 1];
	}
	for (int i = 1; i <= m; i++) {
		cin >> lb[i] >> vb[i];
		pb[i] = lb[i] + pb[i - 1];
	}

	vector<vector<bool>> dp(n + 2, vector<bool>(m + 2, 0));
	vector<vector<bool>> dpp(n + 2, vector<bool>(m + 2, 1));
	vector<vector<bool>> dp0(n + 2, vector<bool>(m + 2, 0));
	vector<vector<bool>> dp1(n + 2, vector<bool>(m + 2, 0));
	vector<vector<int>> lsta(n + 2, vector<int>(k + 1, n + 1));
	vector<vector<int>> lstb(m + 2, vector<int>(k + 1, m + 1));
	for (int i = n; i > 0; i--) {
		lsta[i] = lsta[i + 1];
		lsta[i][va[i]] = i;
	}
	for (int i = m; i > 0; i--) {
		lstb[i] = lstb[i + 1];
		lstb[i][vb[i]] = i;
	}
	for (int i = n; i > 0; i--) {
		for (int j = m; j > 0; j--) {
			if (va[i] == vb[j]) {
				dp1[i][j] = 1;
				dp0[i][j] = !dpp[i + 1][j + 1];
				if (min(la[i], lb[j]) % 2 == 0) {
					dp[i][j] = dp0[i][j];
					dpp[i][j] = dp1[i][j];
				}
				else {
					dp[i][j] = dp1[i][j];
					dpp[i][j] = dp0[i][j];
				}
			}
			else {
				dp[i][j] = (dp[i][j + 1] || dp[i + 1][j]);
				dpp[i][j] = (dpp[i][j + 1] || dpp[i + 1][j]);
			}
		}
	}

	vector<bool> ans(t);
	for (int q = 0; q < t; q++) {
		int x, y;
		cin >> x >> y;

		int ai = upper_bound(pa.begin(), pa.end(), x) - pa.begin();
		int bi = upper_bound(pb.begin(), pb.end(), y) - pb.begin();

		if (min(pa[ai] - x, pb[bi] - y) % 2 == 0)
			ans[q] = dp0[ai][bi];
		else
			ans[q] = dp1[ai][bi];
	}

	for (auto x : ans)
		cout << (x ? "Yes" : "No") << '\n';

	return;
}

int main()
{
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
#endif
	ios_base::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);

	solve();
}