#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define sp " "
#define YES cout << "YES" << endl
#define NO cout << "NO" << endl
#define Yes cout << "Yes" << endl
#define No cout << "No" << endl
#define yes cout << "yes" << endl
#define no cout << "no" << endl
void messi()
{
ll n;
cin >> n;
vector<ll> v(n);
for (ll &x : v)
cin >> x;
ll q;
cin >> q;
while (q--)
{
ll a, b, x;
cin >> a >> b >> x;
if (a == 1)
{
v[b] = x;
}
else
{
bool flag = true;
for (ll i = b; i < x; i++)
{
if (v[i] > v[i + 1])
{
flag = false;
break;
}
}
if (flag)
YES;
else
NO;
}
}
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(NULL);
ll tc = 1; // cin>>tc;
while (tc--)
{
messi();
}
return 0;
}