#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll N = 2e5 + 10;
const ll MOD = 1e9 + 7;
void solve()
{
int n;
cin >> n;
vector<int> v(n);
for(int i = 0; i < n; i++) {
cin >> v[i];
}
set<int>st;
for(int i = 1; i < n - 1; i++) {
if(v[i - 1] <= v[i] && v[i] <= v[i + 1]) continue;
st.insert(i);
}
int q;
cin >> q;
while(q--) {
int type, a, b;
cin >> type >> a >> b;
if(type == 1) {
v[a - 1] = b;
for(int i = max(1, a - 1); i < min(n - 1, a + 1); i++) {
if(v[i - 1] <= v[i] && v[i] <= v[i + 1]) {
if(st.find(i) != st.end()) st.erase(i);
}
else st.insert(i);
}
}
else {
a++;
b--;
auto it = st.lower_bound(a);
if(it != st.end() and *it <= b) {
cout << "NO" << "\n";
}
else cout << "YES" << "\n";
}
}
}
int main()
{
ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
solve();
}