#include<bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define pb push_back
#define int short
const int N=3002;
int a[N];
vector<int>vc[N];
int ans[N];
int n,k,q;
bool check(int l, int r){
int u=0;
vector<int>deg(n+10);
vector<bool>vis(n+10);
int cnt=0;
for(int i=l;i<=r;i++){
vc[a[i]].clear();
vis[a[i]]=1;
}
for(int i=1;i<=n;i++)cnt+=vis[i];
for(int i=l;i<r;i++){
u^=1;
if(u){
vc[a[i]].pb(a[i+1]);
deg[a[i+1]]++;
}
else{
vc[a[i+1]].pb(a[i]);
deg[a[i]]++;
}
}
queue<int>q;
for(int x=1;x<=n;x++){
if(vis[x] and deg[x]==0) q.push(x);
}
while(!q.empty()){
auto x=q.front();
q.pop();
vis[x]=0;
cnt--;
for(auto y:vc[x]){
deg[y]--;
if(deg[y]==0){
q.push(y);
}
}
}
return (cnt==0);
}
signed main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin>>n>>k>>q;
for(int i=1;i<=n;i++){
cin>>a[i];
}
for(int l=1;l<=n;l++){
int lo=l,hi=n;
while(hi>=lo){
int mid=(lo+hi)/2;
if(check(l,mid)){
lo=mid+1;
}
else{
hi=mid-1;
}
}
ans[l]=hi;
}
while(q--){
int l,r;
cin>>l>>r;
if(r<=ans[l]){
cout<<"YES"<<'\n';
}
else{
cout<<"NO"<<'\n';
}
}
}