#include <cstdio>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
using namespace std;
const int M = 200005;
int read()
{
	int x=0,f=1;char c;
	while((c=getchar())<'0' || c>'9') {if(c=='-') f=-1;}
	while(c>='0' && c<='9') {x=(x<<3)+(x<<1)+(c^48);c=getchar();}
	return x*f;
}
int n,m,q,s,d,a[M],mx[M],fa[M];map<int,int> mp;
struct node
{
	int v,c;
};vector<node> g[M];
int Abs(int x)
{
	return x>0?x:-x;
}
int find(int x)
{
	if(x!=fa[x]) fa[x]=find(fa[x]);
	return fa[x];
}
void solve()
{
	set<int> s;vector<int> v[M];
	for(int i=1;i<=n;i++)
	{
		v[find(i)].push_back(i);
		s.insert(a[i]);
	}
	for(int i=1;i<=n;i++)
	{
		if(!v[i].size()) continue;
		for(int x:v[i]) s.erase(a[x]);
		int mn=1e9,p=0,q=0;
		for(int x:v[i])
		{
			for(int dx:{-d,d})
			{
				set<int>::iterator it=s.lower_bound(a[x]+dx);
				if(it!=s.end())
				{
					int val=Abs(Abs(a[x]-(*it))-d);
					if(val<mn) mn=val,p=x,q=mp[*it];
				}
				if(it!=s.begin())
				{
					it--;
					int val=Abs(Abs(a[x]-(*it))-d);
					if(val<mn) mn=val,p=x,q=mp[*it];
				}
			}
		}
		if(mn<1e9 && find(p)!=find(q))
		{
			fa[find(p)]=find(q);m--;
			g[p].push_back(node{q,mn});
			g[q].push_back(node{p,mn});
		}
		for(int x:v[i]) s.insert(a[x]);
	}
}
void dfs(int u,int fa)
{
	for(node x:g[u])
	{
		if(x.v==fa) continue;
		mx[x.v]=max(x.c,mx[u]);
		dfs(x.v,u);
	}
}
signed main()
{
	n=m=read();q=read();s=read();d=read();
	for(int i=1;i<=n;i++)
		a[i]=read(),fa[i]=i,mp[a[i]]=i;
	while(m>1) solve();
	dfs(s,0);
	while(q--)
	{
		int u=read(),k=read();
		if(mx[u]<=k) puts("YES");
		else puts("NO");
	}
}