#include<iostream>
using namespace std;
int check(int l, int r, int* a, int n)
{
int memo;
if(r-l==1) return 1;
for(int i=l;i<=r;i++)
{
if(a[i]>a[i+1]) memo=i;
}
for(int i=memo;i<r;i++)
{
if(a[i]<a[i+1]) return 0;
}
return 1;
}
int main()
{
int t; cin>>t;
while(t--)
{
int n; cin>>n;
int a[n];
for(int i=0;i<n;i++)
{
cin>>a[i];
}
int L, R; cin>>L>>R;
if (check(L,R,a,n)) cout<<"Yes\n";
else cout<<"No\n";
}
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IGNoZWNrKGludCBsLCBpbnQgciwgaW50KiBhLCBpbnQgbikKewoJaW50IG1lbW87CglpZihyLWw9PTEpIHJldHVybiAxOwoJZm9yKGludCBpPWw7aTw9cjtpKyspCgl7CgkJaWYoYVtpXT5hW2krMV0pIG1lbW89aTsKCX0KCWZvcihpbnQgaT1tZW1vO2k8cjtpKyspCgl7CgkJaWYoYVtpXTxhW2krMV0pIHJldHVybiAwOwoJfQoJcmV0dXJuIDE7Cn0KCmludCBtYWluKCkKewoJaW50IHQ7IGNpbj4+dDsKCXdoaWxlKHQtLSkKCXsKCQlpbnQgbjsgY2luPj5uOwoJCWludCBhW25dOwoJCWZvcihpbnQgaT0wO2k8bjtpKyspCgkJewoJCQljaW4+PmFbaV07CgkJfQoJCWludCBMLCBSOyBjaW4+Pkw+PlI7CgkJaWYgKGNoZWNrKEwsUixhLG4pKSBjb3V0PDwiWWVzXG4iOwoJCWVsc2UgY291dDw8Ik5vXG4iOwoJfQoJcmV0dXJuIDA7Cn0=