//Bismillah
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pii;
#define PB push_back
#define F first
#define S second
#define endl '\n'
#define all(a) (a).begin(),(a).end()
#define sz(x) (int)x.size()
#define mx_int_prime 999999937
const double PI = acos(-1);
const double eps = 1e-9;
const int inf = 2000000000;
const ll infLL = 9000000000000000000;
#define MOD 1000000007
#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define file() freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);
template < typename F, typename S >
ostream& operator << ( ostream& os, const pair< F, S > & p ) {
return os << "(" << p.first << ", " << p.second << ")";
}
template < typename T >
ostream &operator << ( ostream & os, const vector< T > &v ) {
os << "{";
for(auto it = v.begin(); it != v.end(); ++it) {
if( it != v.begin() ) os << ", ";
os << *it;
}
return os << "}";
}
template < typename T >
ostream &operator << ( ostream & os, const set< T > &v ) {
os << "[";
for(auto it = v.begin(); it != v.end(); ++it) {
if( it != v.begin() ) os << ", ";
os << *it;
}
return os << "]";
}
template < typename T >
ostream &operator << ( ostream & os, const multiset< T > &v ) {
os << "[";
for(auto it = v.begin(); it != v.end(); ++it) {
if( it != v.begin() ) os << ", ";
os << *it;
}
return os << "]";
}
template < typename F, typename S >
ostream &operator << ( ostream & os, const map< F, S > &v ) {
os << "[";
for(auto it = v.begin(); it != v.end(); ++it) {
if( it != v.begin() ) os << ", ";
os << it -> first << " = " << it -> second ;
}
return os << "]";
}
#define dbg(args...) do {cerr << #args << " : "; faltu(args); } while(0)
void faltu () {
cerr << endl;
}
template <typename T>
void faltu( T a[], int n ) {
for(int i = 0; i < n; ++i) cerr << a[i] << ' ';
cerr << endl;
}
template <typename T, typename ... hello>
void faltu( T arg, const hello &... rest) {
cerr << arg << ' ';
faltu(rest...);
}
const int mx=2e5+1;
int a[mx],t[mx*4];
void update(int v,int tl,int tr,int pos)
{
if(tl==tr){
if(a[pos]>=a[pos-1]){
t[v]=1;
}else t[v]=0;
}else{
int tm=(tl+tr)/2;
if(pos<=tm) update(v*2,tl,tm,pos);
else update(v*2+1,tm+1,tr,pos);
t[v]=t[v*2]+t[v*2+1];
}
}
int query(int v,int tl,int tr,int l,int r)
{
if(r<tl || l>tr) return 0;
else if(tl>=l and tr<=r) return t[v];
else{
int tm=(tl+tr)/2;
return query(v*2,tl,tm,l,r)+query(v*2+1,tm+1,tr,l,r);
}
}
signed main()
{
optimize();
file();
int n,q,type,idx,val,l,r;
cin>>n;
for(int i=1;i<=n;i++) cin>>a[i];
for(int i=1;i<=n;i++) update(1,1,n,i);
cin>>q;
while(q--){
cin>>type;
if(type==1){
cin>>idx>>val;
a[idx]=val;
update(1,1,n,idx);
if((idx+1)<=n)update(1,1,n,idx+1);
}else{
cin>>l>>r;
int ret=query(1,1,n,l+1,r);
(ret==(r-l))? cout<<"YES"<<endl : cout<<"NO"<<endl;
}
}
return 0;
}