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

int main() {
	
	int n,q,k;
	cin>>n>>q>>k;
	
	vector<int> numbers(5*n, 0);
	
	vector<int> startTimes(n), endTimes(n);
	vector<int> updates(5*n,0);
	
	for(int i=0; i<n; i++){
		cin>>startTimes[i];
		updates[startTimes[i]]++;
	}
	
	for(int i=0; i<n; i++){
		cin>>endTimes[i];
		updates[endTimes[i] + 1]--;
	}
	
	vector<int> B(5*n,0);
	
	for(int i=0; i<5*n; i++){
		updates[i+1] = updates[i+1] + updates[i];
		numbers[i] += updates[i];
		
		if(numbers[i] >= k)B[i] = 1;
		
	}
	
	for(int i=0; i<5*n-1; i++){
		B[i+1] = B[i+1] + B[i];
	}
	
	vector<pair<int,int>> queries(q);
	
	for(auto& query: queries){
		cin>>query.first>>query.second;
		
		int L = query.first, R = query.second;
		
		if(B[R] - B[L - 1] >0)cout<<"YES"<<endl;
		
		else cout<<"NO"<<endl;
	}
	
	
	return 0;
}