#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define sz(a) (int)(a.size())
#define all(a) a.begin(),a.end()
#define lb lower_bound
#define ub upper_bound
#define owo ios_base::sync_with_stdio(0);cin.tie(0);
#define MOD (ll)(998244353)
#define INF (ll)(1e18)
#define debug(...) fprintf(stderr, __VA_ARGS__),fflush(stderr)
#define time__(d) for(long blockTime = 0; (blockTime == 0 ? (blockTime=clock()) != 0 : false);\
debug("%s time : %.4fs\n", d, (double)(clock() - blockTime) / CLOCKS_PER_SEC))
typedef long long int ll;
typedef long double ld;
typedef pair<ll,ll> PII;
typedef pair<int,int> pii;
typedef vector<vector<int>> vii;
typedef vector<vector<ll>> VII;
const int MAXN = 1e6+5;
int id[MAXN];
int par[MAXN];
int ans[MAXN];
vii comp(MAXN);
vector<vector<pii>> adj(MAXN);
int find(int x){
	if(x==par[x])return x;
	return par[x] = find(par[x]);
}
bool unite(int a,int b){
	a = find(a);
	b = find(b);
	if(a==b)return 0;
	if(sz(comp[a]) > sz(comp[b]))swap(a,b);
	for(int x:comp[a])comp[b].pb(x);
	par[a] = b;
	comp[a].clear();
	return 1;
}
void dfs(int v,int u,int mx){
	ans[v] = mx;
	for(pii x:adj[v]){
		if(x.fi == u)continue;
		dfs(x.fi,v,max(mx,x.se));
	}
}
int main()
{
	owo
	int n,q,s,d;
	cin>>n>>q>>s>>d;
	vector<int>a(n);
	set<int>rock,cur;
	for(int i=0;i<n;i++){
		cin>>a[i];
		cur.insert(i);
		comp[i].pb(i);
		rock.insert(a[i]);
		par[i] = i;
		id[a[i]] = i;
	}
	int cnt = n;
	while(cnt>1){
		vector<pair<pii,int>>add;
		for(int s:cur){
			pii e = {-1,-1};
			int mn = 1e9;
			for(int x:comp[s])rock.erase(a[x]);
			for(int x:comp[s]){
				auto it = rock.lb(a[x]-d);
				if(it != rock.end()){
					if(mn > *it - (a[x]-d)){
						mn = *it - (a[x]-d);
						e = {id[*it],x};
					}
				}
				if(it != rock.begin()){
					it--;
					if(mn > (a[x]-d) - *it){
						mn = a[x]-d - *it;
						e = {id[*it],x};
					}
					it++;
				}
				it = rock.lb(a[x]+d);
				if(it != rock.end()){
					if(mn > *it - (a[x]+d)){
						mn = *it - (a[x]+d);
						e = {id[*it],x};
					}
				}
				if(it != rock.begin()){
					it--;
					if(mn > (a[x]+d) - *it){
						mn = a[x]+d - *it;
						e = {id[*it],x};
					}
				}
			}
			for(int x:comp[s])rock.insert(a[x]);
			if(e.fi != -1)add.pb({e,mn});
		}
		for(auto x:add){
			int a = x.fi.fi;
			int b = x.fi.se;
			if(find(a) != find(b)){
				adj[a].pb({b,x.se});
				adj[b].pb({a,x.se});
				cnt--;
				a = find(a);
				b = find(b);
				cur.erase(a);
				cur.erase(b);
				unite(a,b);
				cur.insert(find(a));
			}
			
		}
	}
	s--;
	dfs(s,-1,0);
	while(q--){
		int i,k;
		cin>>i>>k;
		i--;
		if(ans[i] <= k)cout<<"YES"<<'\n';
		else cout<<"NO"<<'\n';
	}
		
		
	
}
