#include using namespace std; typedef long long ll; #define range(i, a, b) for (int i = (a); i < (b); ++i) ll M = 1'000'000'007; long long sum(vector &tree, long long index) { long long sum = 0; ++index; while (index > 0) { sum = (sum + tree[index] % 1'000'000'007); index -= index & (-index); } return sum; } void update(vector &tree, long long index, long long val) { long long n = tree.size () - 1; ++index; while (index <= n) { tree[index] = (tree[index] + val) % 1'000'000'007; index += index & (-index); } } long long modinv(long long x) { long long t = 0, nt = 1; long long r = M, nr = x; while (nr) { long long q = r / nr; long long tmp = t; t = nt; nt = tmp - q * nt; tmp = r; r = nr; nr = tmp - q * nr; } if (t < 0) { t += M; } return t; } int main() { ios_base::sync_with_stdio(false); int n, a, b, q; cin >> n >> a >> b >> q; vector fw(n + 100); int p = (long long)(M - b) * modinv(a) % M; ll f[100002], g[100002]; f[0] = 1; g[0] = 1; range(i, 1, 100002) { f[i] = (f[i - 1] * p) % M; g[i] = modinv(f[i]); } vector gg; range(i, 0, n) { ll _; cin >> _; gg.push_back(_); update(fw, i + 1, _ * f[i] % M); } range(i, 0, q) { ll t, c, d; cin >> t >> c >> d; if (t == 1) { update(fw, c + 1, (M - gg[c] * f[c] % M) % M); gg[c] = d; update(fw, c + 1, (gg[c] * f[c] % M)); } else if (t == 2) { ll sm = (M + sum(fw, d + 1) - sum(fw, c)) % M; sm = (sm * g[i]) % M; cout << (sm == 0 ? "Yes" : "No") << endl; } } }