#include using namespace std; #define rep(i,a,b) for(int i=a;i>= 1; return r; } ll moddiv(ll a, ll b) { ll ap_2 = modpow(b, MOD - 2); return (a * ap_2) % MOD; } template class SegTree { public: static V const def = 0; V comp(V l, V r) { return (l + r) % MOD; }; vector val; SegTree() { val = vector(NV * 2, def); } V getval(int l, int r) { //[l,r] l += NV; r += NV + 1; V ret = def; while (l < r) { if (l & 1) ret = comp(ret, val[l++]); if (r & 1) ret = comp(ret, val[--r]); l /= 2; r /= 2; } return ret; } void update(int i, V v) { i += NV; val[i] = v; while (i>1) i >>= 1, val[i] = comp(val[i * 2], val[i * 2 + 1]); } }; //----------------------------------------------------------------- int N, Q; ll A, B; ll C[101010]; //----------------------------------------------------------------- SegTree st; int main() { cin >> N >> A >> B >> Q; rep(i, 0, N) scanf("%lld", &C[i]); ll x = moddiv((MOD - B), A); rep(i, 0, N) { st.update(i, (C[i] * modpow(x, i)) % MOD); } rep(i, 0, Q) { int q; scanf("%d", &q); if (q == 1) { int j; scanf("%d", &j); ll y; scanf("%lld", &y); st.update(j, y * modpow(x, j)); } else { int l, r; scanf("%d %d", &l, &r); ll a = st.getval(l, r); a = moddiv(a, modpow(x, l)); if (a == 0) printf("Yes\n"); else printf("No\n"); } } }