#include using namespace std; typedef long long ll; ll big = 1000000007ll; ll n,m,k; ll ones = 9223372036854775807ll; vector A; vector B; vector F; vector ABI; ll a,b,c,q; ll ai,bi,abi; ll mod(ll i){ if(i < 0)return mod(big - mod(-i)); if(i < big)return i; return i%big; } ll upp(ll i, ll j){ if(j == 0)return 1; if(j % 2 == 0){ ll h = upp(i, j/2); return mod(h*h); } return mod(upp(i,j-1) * i); } ll parent(ll i){ return i-(i&(ll(i^ones)+1ll)); } ll next(ll i){ if(i==0){return 1ll;} return i+(i&(ll(i^ones)+1ll)); } void update(ll i, ll to){ if(i >= n){return;} ll j = i+1; while(j <= n){ F[j] += mod(to-A[i]); F[j] = mod(F[j]); j = next(j); } return; } ll prefix(ll i){ if(i == 0){return 0;} return mod(F[i]+prefix(parent(i))); } int main() { //freopen("input.txt","r",stdin); //freopen("output.txt","w",stdout); ll c1,c2,c3,c4,c5; cin >> n >> a >> b >> q; ai = upp(a , big-2); bi = upp(b , big-2); abi = mod(-a*bi); ll pre = 1; for(ll c1 = 0; c1 < n; c1++){ ABI.push_back(pre); pre *= abi; pre = mod(pre); } for(c1 = 0; c1 < n+1; c1++){ A.push_back(0); F.push_back(0); } for(c1 = 0; c1 < n; c1++){ ll i; cin >> i; B.push_back(i); i = mod(i * ABI[n-c1-1]); update(c1,i); A[c1] = i; } for(c1 = 0; c1 < q; c1++){ ll i,j; ll type; cin >> type >> i >> j; if(type == 1){ update(i , mod(mod(ABI[n-i-1] * j))); A[i] = mod(ABI[n-i-1] * j); B[i] = j; } else{ if(a == 0 || b == 0){ cout << "Yes\n"; } else{ if(i == j){ if(B[i]%big == 0){ cout << "Yes\n"; } else{ cout << "No\n"; } } else{ ll sum = mod(prefix(j-1) - prefix(i)); //cout << sum << " s\n"; sum *= upp(ABI[n-j] , big-2); sum = mod(sum); if(mod(B[j-1] + sum) == mod(mod(ai*b) * B[j])){ cout << "Yes\n"; } else{ cout << "No\n"; } } } } } return 0; }