#include using namespace std; typedef long long ll; const ll MXN = 1e5 + 1, MOD = 1e9 + 7LL, MXM = 100; ll A[MXM][MXN] = {}, C[MXN], ans[MXM] = {}, cnt = 0, a, b; ll fE(ll b, ll e){ ll r = 1; while(e) if(e&1) r=(r*b)%MOD,e--; else e>>=1, b=(b*b)%MOD; return r; } int main() { int N, Q; cin >> N >> a >> b >> Q; ll aI = fE(a,MOD-2LL); for(int x = 0; x < N; x++) cin >> C[x]; for(int x = 0; x < Q; x++) { int t; cin >> t; if(t==1) { int i, X; cin >> i >> X; C[i] = X; } else { int l, r; cin >> l >> r; int can = 1; ll last = 0; for(int x = r; x > l; x--) last = ((((C[x] - (last * b)%MOD)%MOD + MOD)%MOD) * aI)%MOD; cout << ((last * b)%MOD == C[l] ? "Yes\n" : "No\n"); } } }