#include<cstdio>

int p[10001],n,m,l,r,x;

int main(){

scanf(“%d%d”,&n,&m);

for(x=1;x<=n;x++)scanf(“%d”,&p[x]);

for(;m–;){

scanf(“%d%d%d”,&l,&r,&x);

for(n=l;n<=r;n++)if(p[n]<p[x])l++;

printf(“%s\n”,l==x?”Yes”:”No”);

}

return 0;

}

int p[10001],n,m,l,r,x;

int main(){

scanf(“%d%d”,&n,&m);

for(x=1;x<=n;x++)scanf(“%d”,&p[x]);

for(;m–;){

scanf(“%d%d%d”,&l,&r,&x);

for(n=l;n<=r;n++)if(p[n]<p[x])l++;

printf(“%s\n”,l==x?”Yes”:”No”);

}

return 0;

}