/*
BISMILLAHIR RAHMANIR RAHIM
*/
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
vector<int> prefix;
#define dbg(x) cout<<#x<<" "<<x<<endl;
void p(int n,vector<int> v)
{
prefix.resize(n + 1, 0);
prefix[0] = 1;
for (int i = 1; i < n; ++i) {
if (v[i] >= v[i - 1]) {
prefix[i] = prefix[i - 1] + 1;
} else {
prefix[i] = 1;
}
}
}
void solve()
{
int n;cin>>n;
vector<int> v(n);
for(auto &it:v)
{
cin>>it;
}
p(n,v);
int q;cin>>q;
// dbg(q);
// cout<<q<<endl;
while(q--){
int t;cin>>t;
if(t==1)
{
int i, x;
cin >> i >> x;
--i;
v[i] = x;
if (i > 0) {
if (v[i] >= v[i - 1]) {
prefix[i] = prefix[i - 1] + 1;
} else {
prefix[i] = 1;
}
}
if (i < n - 1) {
if (v[i + 1] >= v[i]) {
prefix[i + 1] = prefix[i] + 1;
} else {
prefix[i + 1] = 1;
}
}
}
else
{
int l, r;
cin >> l >> r;
l--;r--;
if(r==l)
{
cout<<"YES"<<endl;continue;
}
if (prefix[r] == (r - l + 1)) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
}
}
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t=1;
// cin>>t;
while(t--)
{
solve();
}
return 0;
}