/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;
/* Name of the class has to be "Main" only if the class is public. */
class Main
{
{
new Main().run();
}
int a[], t[][];
void run() {
try {
int n = nextInt();
int k = nextInt();
a = new int[n];
for (int i = 0; i < n; i++) {
a[i] = nextInt();
}
t = new int[2][4 * n];
build(1, 0, n - 1);
int m = nextInt();
for (int i = 0; i < m; i++) {
int q = nextInt();
if (q == 1) {
int l = nextInt() - 1;
int r = nextInt() - 1;
int[] res = query(1, 0, n - 1, l, r);
if (res
[0] < Integer.
MAX_VALUE && res
[1] < Integer.
MAX_VALUE && res
[0] + res
[1] <= k
) out.println("Yes");
else
out.println("No");
} else {
int l = nextInt() - 1;
int x = nextInt();
update(1, 0, n - 1, l, x);
}
}
out.close();
e.printStackTrace(out);
out.close();
//while (true);
}
}
void combine(int s1, int s2, int res) {
if (t[0][s1] < t[0][s2]) {
t[0][res] = t[0][s1];
if (t[1][s1] < t[0][s2])
t[1][res] = t[1][s1];
else
t[1][res] = t[0][s2];
} else {
t[0][res] = t[0][s2];
if (t[0][s1] < t[1][s2])
t[1][res] = t[0][s1];
else
t[1][res] = t[1][s2];
}
}
void combine2(int[] s1, int[] s2, int[] res) {
if (s1[0] < s2[0]) {
res[0] = s1[0];
if (s1[1] < s2[0])
res[1] = s1[1];
else
res[1] = s2[0];
} else {
res[0] = s2[0];
if (s1[0] < s2[1])
res[1] = s1[0];
else
res[1] = s2[1];
}
}
void build(int v, int tl, int tr) {
if (tl == tr) {
t[0][v] = a[tl];
return;
}
int tm = (tl + tr) >> 1;
build(v << 1, tl, tm);
build((v << 1) + 1, tm + 1, tr);
combine(v << 1, (v << 1) + 1, v);
}
void update(int v, int tl, int tr, int pos, int x) {
if (tl == tr) {
t[0][v] = x;
return;
}
int tm = (tl + tr) >> 1;
if (pos <= tm)
update(v << 1, tl, tm, pos, x);
else
update((v << 1) + 1, tm + 1, tr, pos, x);
combine(v << 1, (v << 1) + 1, v);
}
int[] query(int v, int tl, int tr, int l, int r) {
if (l > r)
return inf_res;
if (l == tl && r == tr) {
int[] res = new int[2];
res[0] = t[0][v];
res[1] = t[1][v];
return res;
}
int tm = (tl + tr) >> 1;
int[] q1
= query
(v
<< 1, tl, tm, l,
Math.
min(tm, r
)); int[] q2
= query
((v
<< 1) + 1, tm
+ 1, tr,
Math.
max(l, tm
+ 1), r
); int[] res = new int[2];
combine2(q1, q2, res);
return res;
}
st.nextToken();
return (int) st.nval;
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CmltcG9ydCBqYXZhLm1hdGguKjsKCi8qIE5hbWUgb2YgdGhlIGNsYXNzIGhhcyB0byBiZSAiTWFpbiIgb25seSBpZiB0aGUgY2xhc3MgaXMgcHVibGljLiAqLwpjbGFzcyBNYWluCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCW5ldyBNYWluKCkucnVuKCk7Cgl9CgkKCWludCBpbmZfcmVzW10gPSB7SW50ZWdlci5NQVhfVkFMVUUsIEludGVnZXIuTUFYX1ZBTFVFfTsKCWludCBhW10sIHRbXVtdOwoJCglTdHJlYW1Ub2tlbml6ZXIgc3Q7CglQcmludFdyaXRlciBvdXQ7CgoJdm9pZCBydW4oKSB7CgkJdHJ5IHsKCQkJc3QgPSBuZXcgU3RyZWFtVG9rZW5pemVyKG5ldyBCdWZmZXJlZFJlYWRlcihuZXcgSW5wdXRTdHJlYW1SZWFkZXIoU3lzdGVtLmluKSkpOwoJCQlvdXQgPSBuZXcgUHJpbnRXcml0ZXIobmV3IEJ1ZmZlcmVkV3JpdGVyKG5ldyBPdXRwdXRTdHJlYW1Xcml0ZXIoU3lzdGV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