// Segment Tree
#include<bits/stdc++.h>
#define ll long long
using namespace std;
const int mx = 2e5+20;
int tree[mx * 4] , arr[mx], a[mx];
void build(int node, int b, int e){
if (b == e){
tree[node] = arr[b];
return;
}
int left = node * 2;
int right = node * 2 + 1;
int mid = (b + e) >> 1;
build(left, b, mid);
build(right, mid + 1, e);
//int
tree[node] = min(tree[left], tree[right]);
}
int query(int node, int b, int e, int i, int j){
if (b >= i && e <= j){
return tree[node];
}
if (e < i || b > j){
return 1;
}
int left = node << 1;
int right = (node << 1)+1;
int mid = (b + e) >> 1;
int leftMax = query(left, b, mid, i , j);
int rightMax = query(right, mid + 1, e, i, j);
return min(leftMax, rightMax);
}
void update(int node, int b, int e, int index, int value){
if (b >= index && e <= index){
tree[node] = value;
return;
}
if(b > index || e < index){
return;
}
int left = node * 2;
int right = node * 2 + 1;
int mid = (b + e) >> 1;
update(left, b, mid, index, value);
update(right, mid + 1, e , index , value);
tree[node] = min(tree[left], tree[right]);
}
int main(){
int n, q, m;
cin>>n;a[n+1]=1e9;
for (int i = 0; i <= n+1; i++) arr[i] = 1;
for(int i = 1; i <= n; i++){
cin>>a[i];
if (a[i] < a[i - 1]) arr[i] = 0;
}
build(1, 1, n);
cin >> q;
while (q--){
cin >> m;
if (m == 1){
int idx, x;
cin >> idx >> x;
if (x >= a[idx-1]){
update(1,1,n,idx,1);
//if (idx<n){
if(x<=a[idx+1])update(1,1,n,idx+1,1);
else update(1,1,n,idx+1,0);
// }
} else {
if (x<=a[idx+1]) update(1,1,n,idx+1,1);
update(1,1,n,idx,0);
}
a[idx] = x;
} else {
int L, R;
cin >> L >> R;
if (L == R || (L+1==R && a[L]<=a[R])){
cout << "YES" << endl;
continue;
}
if(a[L]>a[L+1]){
cout<<"NO"<<endl;
continue;
}
int ok = query(1, 1, n, L+1, R);
if (ok == 1) cout << "YES" << endl;
else cout << "NO" << endl;
}
}
/*cout<< query(1, 1, n, 2, 5)<<endl;
update(1, 1, n, 4, 2);
cout<<query(1,1,n,3,3);*/
}