#include #define up(j,k,i) for(i=j;ik;i--) #define M 1000000007 #define pp(n) printf("%lld\n",ll(n)) #define ps(n) printf("%lld ",ll(n)) #define pd(x,y) printf("%lld %lld\n",ll(x),ll(y)) #define is(n) scanf("%lld",&n) #define max(x,y) max(ll(x),ll(y)) #define min(x,y) min(ll(x),ll(y)) #define inf LLONG_MAX #define id(n,m) scanf("%lld%lld",&n,&m) #define it(n,m,k) scanf("%lld%lld%lld",&n,&m,&k) #define ss(s) scanf("%s",s) #define cool 0 #define pb push_back #define mp make_pair #define F first #define S second #define pll pair #define db cout<<"######\n" #define null(a) memset(a,0,sizeof(a)) #define neg(a) memset(a,255,sizeof(a)) typedef long double ld; typedef long long int ll; using namespace std; ll i,j,k,z,t,n,m,sum,ans,x,y,maxm=0,minm=inf; ll a,b,q; ll fact[100005],arr[100005],BIT[100005]; ll powmod(ll base, ll exponent) { ll ans=1; while(exponent) { while(exponent%2==0) {base=(base*base)%M; exponent/=2; } exponent--; ans=(ans*base)%M; } return ans; } void update(ll i, ll x) {i++; while(i<=n) { BIT[i]=(BIT[i]+x)%M; i+=(i&(-i)); } } ll query(ll i) { ll ans=0; i++; while(i>0) { ans=(ans+BIT[i])%M; i-=(i&(-i)); } return ans; } int main() { it(n,a,b); is(q); fact[0]=1; up(1,n+1,i) fact[i]=fact[i-1]*(M-b)%M*powmod(a,M-2)%M; up(0,n,i) { is(arr[i]); update(i,arr[i]*fact[i]%M); } while(q--) { is(t); if(t==1) { id(i,x); update(i,(M-arr[i])*fact[i]%M); arr[i]=x; update(i,arr[i]*fact[i]%M); } else { id(x,y); if((query(y)-query(x-1)+M)%M==0) puts("Yes"); else puts("No"); } } }