#include <bits/stdc++.h>
using namespace std;
void Abdullah() {
	ios_base::sync_with_stdio(0),
		cin.tie(0), cout.tie(0);
}
long long fast_power(long long base, long long power, long long mod = 1e9 + 7) {
    long long result = 1;
    base = base % mod; 

    while (power > 0) {
        if (power % 2 == 1) {
            result = (result * base) % mod;
        }
        base = (base * base) % mod;
        power = power / 2;
    }
    
    return result;
}
int main() {
	Abdullah();
    int n ; cin>>n ; 
    vector<int>v(n+2,0);
    for(int i=1 ; i<=n ; i++){
        cin>>v[i];
    }
    int q ; cin>>q ; 
    int cnt_inc =0 ; 
    int cnt_dec =0 ; 
    for(int i=2 ; i<=n ; i++){
        if(v[i]>v[i-1]){
            cnt_inc++;
        }
        else{
            cnt_dec++;
        }
        
    }
    while(q--){
        int y;cin>>y;
        if(y==1){
            int index , x ; 
            cin>>index>>x ; 
            int index_before = index-1 ; 
            int index_after = index+1;
            if(v[index] > v[index_before]){
                if(x < v[index_before]){
                    cnt_inc--;
                    cnt_dec++;
                }
                
            }
            if(v[index] < v[index_before]){
                if(x > v[index_before]){
                    cnt_inc++;
                    cnt_dec--;
                }
            }
            if(v[index] < v[index_after]){
                if(x > v[index_after]){
                    cnt_inc--;
                    cnt_dec++;
                }
            }
            if(v[index] > v[index_after]){
                if(x < v[index_after]){
                    cnt_dec--;
                    cnt_inc++;
                }
            }
        }
        else if(y==2){
            if(cnt_inc == n-1 && cnt_dec ==0){cout<<"YES\n";}
            else{cout<<"NO\n";}
        }
        else{
            if(cnt_dec == n-1 && cnt_inc==0){cout<<"YES\n";}
            else{cout<<"NO\n";}
        }
    }

    

}