#include #define up(j,k,i) for(i=j;ik;i--) #define pp(n) printf("%lld\n",n) #define ps(s) printf("%s",s) #define is(n) scanf("%lld",&n) #define ips(n) scanf("%lld",n) #define ss(s) scanf("%s",s) #define cool 0 #define pb push_back #define mp make_pair #define F first #define S second #define f(i) cout< #define pi acos(-1) #define ds(n,m) scanf("%lld %lld",&n,&m) #define ts(n,m,k) scanf("%lld %lld %lld",&n,&m,&k) typedef long double ld; typedef long long int lld; using namespace std; const lld M =2e5+7; const lld mod=1e9+7; const lld infi =LLONG_MAX; lld i,j,ans,k,n,x,y,m,mymax=LLONG_MIN,mymin=LLONG_MAX,b,a,q,z,sum; lld c[M]; lld h[M]; lld binpow(lld base,lld pow,lld modulus) { lld ans=1; base=base%modulus; while(pow>0) { while(pow%2==0) { base=(base*base)%modulus; pow/=2; } ans=(ans*base)%modulus; pow--; } return ans; } lld bit[M]; lld upper_limit=M; void update(lld id,lld val) { while(id0) { sum=(sum+bit[x])%mod; x-=(x&-x); } return sum; } int main() { ds(n,a); ds(b,q); up(1,n+1,i) { is(c[i]); update(i,(c[i]*binpow(-a,n-i,mod)*binpow(b,i-1,mod))%mod); } lld l,r; while(q--) { is(x); ds(l,r); if(x==1) { l++; i=l; update(i,-1*((c[i]*binpow(-a,n-i,mod)*binpow(b,i-1,mod))%mod)); c[l]=r; update(i,(c[i]*binpow(-a,n-i,mod)*binpow(b,i-1,mod))%mod); } else { l++; r++; ans=((cal(r)-cal(l-1))%mod)+mod; ans=ans*binpow(b,mod-l,mod); ans=ans*binpow(-a,mod-n+r,mod); ans=(ans%mod+mod)%mod; if(ans==0)ps("Yes\n"); else ps("No\n"); } } return 0; }