#include <bits/stdc++.h>
using namespace std;

int main() {
	ios::sync_with_stdio(false), cin.tie(nullptr);

	int n, q, s, d;
	cin >> n >> q >> s >> d, s--;
	vector<int> a(n);
	set<pair<int, int>> st;
	for (int i = 0; i < n; i++) {
		cin >> a[i];
		st.emplace(a[i], i);
	}

	vector<int> dist(n, INT_MAX);
	set<array<int, 3>> pq;
	dist[s] = 0;
	pq.insert({0, s, -1});

	auto relax_one = [&](int v) {
		if (v == -1) return;

		auto relax = [&](int u) {
			int new_d = max(dist[v], min(abs(a[v] + d - a[u]), abs(a[v] - d - a[u])));
			dist[u] = min(dist[u], new_d);
			pq.insert({new_d, u, v});
		};

		for (int x : {a[v] - d, a[v] + d}) {
			auto it = st.lower_bound({x, -1});
			if (it != st.end()) relax(it->second);
			if (it != st.begin()) relax(prev(it)->second);
		}
	};

	while (!pq.empty()) {
		auto [cur_d, v, from] = *pq.begin();
		pq.erase(pq.begin());

		st.erase({a[v], v});
		relax_one(from);
		if (cur_d == dist[v])
			relax_one(v);
	}

	while (q--) {
		int i, k;
		cin >> i >> k;
		cout << (dist[i - 1] <= k ? "YES" : "NO") << '\n';
	}
}
