#include<bits/stdc++.h>
using namespace std;
#define int long long
void sol(){
int n;
cin >> n;
int a[n];
for(int &i:a) cin >> i;
set<int>s;
for(int i = 0; i < n; i++){
if(i and a[i] < a[i - 1]) s.insert(i);
}
int q;
cin >> q;
while(q--){
int t, l, r;
cin >> t >> l >> r;
l--, r--;
if(t == 2){
auto it = s.lower_bound(l + 1);
if(it == s.end() or r - l == 1) cout << "YES" << endl;
else if(*it > r) cout << "YES" << endl;
else cout << "NO" << endl;
}
else{
a[l] = r;
if(n == 1) continue;
if(l){
s.erase(l);
// a[l] = r;
if(a[l] < a[l - 1]) s.insert(l);
}
if(l < n - 1){
s.erase(l + 1);
//a[l] = r;
if(a[l + 1] < a[l]) s.insert(l + 1);
}
}
}
}
signed main(){
int t = 1;
//cin >> t;
while(t--){
sol();
}
return 0;
}