#include using namespace std; #define rep(i,a,b) for(int i=(a);i<=(b);i++) #define ll long long #define pll pair #define pii pair #define pb push_back #define F first #define S second #define mod 1000000007 #define maxn 100005 #define boost ios::sync_with_stdio(false);cin.tie(0) #define fr freopen("source.txt","r",stdin),freopen("output.txt","w",stdout) #define SET(a,b) memset(a,b,sizeof(a)) ll bpow(ll x, ll n,ll M=mod){ ll ans = 1; while( n > 0 ){ if(n&1) ans *= x; x *= x; ans %= M; x %= M; n/=2; } return ans%M; } ll c[maxn],t[4*maxn],root; void build(int node,int a,int b){ if(a==b){ t[node]=(bpow(root,1ll*a)*c[a])%mod; return; } int mid=(a+b)/2; build(2*node,a,mid); build(2*node+1,mid+1,b); t[node]=(t[2*node]+t[2*node+1])%mod; return; } void update(int node,int a,int b,int i,ll x){ if(a>i||bb)return; if(a==b){ t[node]=(bpow(root,1ll*a)*x)%mod; return; } int mid=(a+b)/2; update(2*node,a,mid,i,x); update(2*node+1,mid+1,b,i,x); t[node]=(t[2*node]+t[2*node+1])%mod; return; } ll query(int node,int a,int b,int l,int r){ if(a>r||bb)return 0LL; if(l<=a&&b<=r)return t[node]; int mid=(a+b)/2; return (query(2*node,a,mid,l,r)+query(2*node+1,mid+1,b,l,r))%mod; } int main(){ boost; ll n,a,b,q; cin>>n>>a>>b>>q; rep(i,0,n-1)cin>>c[i]; root=(mod-b)%mod; root=(root*bpow(a,mod-2))%mod; build(1,0,n-1); while(q--){ int type; cin>>type; if(type==1){ ll i,x; cin>>i>>x; update(1,0,n-1,i,x); c[i]=x; } else{ ll l,r; cin>>l>>r; ll val=query(1,0,n-1,l,r); val=(val*bpow(bpow(root,l),mod-2))%mod; if(b==0){ if(c[l]!=0){ cout<<"No\n"; continue; } if(l==r){ cout<<"Yes\n"; continue; } ll val=query(1,0,n-1,l+1,r); val=(val*bpow(bpow(root,l+1),mod-2))%mod; } if(val==0)cout<<"Yes\n"; else cout<<"No\n"; } } return 0; }