#include <iostream>
using namespace std;
template <class POINTER_TYPE, class TYPE> class segment_tree
{
TYPE *SegmentTree;
POINTER_TYPE base_capacity = 0;
TYPE (*g)(TYPE, TYPE);
TYPE neutral;
TYPE result_on_segment_in
(
POINTER_TYPE v, POINTER_TYPE tl,
POINTER_TYPE tr, POINTER_TYPE l,
POINTER_TYPE r
)
{
if (l > r) return neutral;
else if (l == tl && r == tr) return SegmentTree[v];
else
{
POINTER_TYPE tm = (tl + tr) / 2;
return g(result_on_segment_in(v*2, tl, tm, l, min(r,tm)),
result_on_segment_in(v*2+1, tm+1, tr, max(l,tm+1), r));
}
}
void make_monoid_and_fill_rest(TYPE *NewTree, const POINTER_TYPE &n, TYPE f(TYPE, TYPE), const TYPE &neutr)
{
g = f;
neutral = neutr;
for(POINTER_TYPE i = base_capacity+n; i < 2*base_capacity; ++i)
{
NewTree[i] = neutral;
}
for(POINTER_TYPE i = base_capacity-1; i > 0; --i)
{
NewTree[i] = g(NewTree[2*i], NewTree[2*i+1]);
}
SegmentTree = NewTree;
}
void fix_capacity(const POINTER_TYPE &base_array_size)
{
for (base_capacity = 1; base_capacity < base_array_size; base_capacity <<= 1);
}
public:
void construct(const TYPE *begin, const TYPE *end, TYPE f(TYPE, TYPE), const TYPE neutr)
{
POINTER_TYPE base_size = end - begin;
fix_capacity(base_size);
TYPE *NewTree = new TYPE[base_capacity*2];
for(POINTER_TYPE i = 0; i < base_size; ++i)
{
NewTree[base_capacity+i] = begin[i];
}
make_monoid_and_fill_rest(NewTree, base_size, f, neutr);
}
void read_and_construct(const POINTER_TYPE amount_of_elements, TYPE preprocessing_function(), TYPE f(TYPE, TYPE), const TYPE neutr)
{
fix_capacity(amount_of_elements);
TYPE *NewTree = new TYPE[base_capacity*2];
for(POINTER_TYPE i = 0; i < amount_of_elements; ++i)
{
NewTree[base_capacity+i] = preprocessing_function();
}
make_monoid_and_fill_rest(NewTree, amount_of_elements, f, neutr);
}
void assign(const POINTER_TYPE index, const TYPE new_value)
{
SegmentTree[base_capacity+index] = new_value;
for (POINTER_TYPE i = (base_capacity+index)/2; i > 0; i /= 2)
{
SegmentTree[i] = g(SegmentTree[2*i], SegmentTree[2*i+1]);
}
}
TYPE result_on_segment (POINTER_TYPE l, POINTER_TYPE r)
{
return result_on_segment_in(1, 0, base_capacity-1, l, r);
}
};
unsigned int f()
{
unsigned int X;
cin >> X;
return X;
}
unsigned int g(unsigned int a, unsigned int b)
{
return max(a, b);
}
int main()
{
unsigned int n, m;
cin >> n;
segment_tree <unsigned int, unsigned int> D;
D.read_and_construct(n, f, g, 0);
cin >> m;
unsigned char *type = new unsigned char[m];
unsigned int *a = new unsigned int[m], *b = new unsigned int[m], l, r;
for (unsigned int i = 0; i < m; ++i)
{
cin >> type[i] >> a[i];
if (type[i] == '2') cin >> b[i];
}
for (unsigned int i = 0; i < m; ++i)
{
while (i < m)
{
if (type[i] == '2')
{
D.assign(a[i]-1, b[i]);
++i;
}
else break;
}
cin >> l >> r;
if (i < m)
{
if (D.result_on_segment(l-1, r-1) == a[i]) cout << "Yes\n";
else cout << "No\n";
}
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwogICAgIAp0ZW1wbGF0ZSA8Y2xhc3MgUE9JTlRFUl9UWVBFLCBjbGFzcyBUWVBFPiBjbGFzcyBzZWdtZW50X3RyZWUKewogICAgVFlQRSAqU2VnbWVudFRyZWU7CiAgICBQT0lOVEVSX1RZUEUgYmFzZV9jYXBhY2l0eSA9IDA7CiAgICBUWVBFICgqZykoVFlQRSwgVFlQRSk7CiAgICBUWVBFIG5ldXRyYWw7CiAgICAgCiAgICBUWVBFIHJlc3VsdF9vbl9zZWdtZW50X2luCiAgICAoCiAgICAgICAgUE9JTlRFUl9UWVBFIHYsIFBPSU5URVJfVFlQRSB0bCwKICAgICAgICBQT0lOVEVSX1RZUEUgdHIsIFBPSU5URVJfVFlQRSBsLAogICAgICAgIFBPSU5URVJfVFlQRSByCiAgICApCiAgICB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lIDx1bnNpZ25lZCBpbnQsIHVuc2lnbmVkIGludD4gRDsKICAgIEQucmVhZF9hbmRfY29uc3RydWN0KG4sIGYsIGcsIDApOwogICAgIAogICAgY2luID4+IG07CiAgICB1bnNpZ25lZCBjaGFyICp0eXBlID0gbmV3IHVuc2lnbmVkIGNoYXJbbV07CiAgICB1bnNpZ25lZCBpbnQgKmEgPSBuZXcgdW5zaWduZWQgaW50W21dLCAqYiA9IG5ldyB1bnNpZ25lZCBpbnRbbV0sIGwsIHI7CiAgICAgCiAgICBmb3IgKHVuc2lnbmVkIGludCBpID0gMDsgaSA8IG07ICsraSkKICAgIHsKICAgIAljaW4gPj4gdHlwZVtpXSA+PiBhW2ldOwogICAgCWlmICh0eXBlW2ldID09ICcyJykgY2luID4+IGJbaV07CiAgICB9CiAgICAgCiAgICBmb3IgKHVuc2lnbmVkIGludCBpID0gMDsgaSA8IG07ICsraSkKICAgIHsKICAgIAl3aGlsZSAoaSA8IG0pCiAgICAJewogICAgCQlpZiAodHlwZVtpXSA9PSAnMicpCiAgICAJCXsKICAgIAkJCUQuYXNzaWduKGFbaV0tMSwgYltpXSk7CiAgICAJCQkrK2k7CiAgICAJCX0KICAgIAkJZWxzZSBicmVhazsKICAgIAl9CiAgICAJY2luID4+IGwgPj4gcjsKICAgIAlpZiAoaSA8IG0pCiAgICAJewogICAgCQlpZiAoRC5yZXN1bHRfb25fc2VnbWVudChsLTEsIHItMSkgPT0gYVtpXSkgY291dCA8PCAiWWVzXG4iOwogICAgCQllbHNlIGNvdXQgPDwgIk5vXG4iOwogICAgCX0KICAgIH0KfQ==