#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define ll long long #define mod 1000000007 ll fast_pow(ll a, ll b) { if(b==0)return 1; ll t=fast_pow(a,b/2); if(b%2) { return ((t*t)%mod*a)%mod; } return (t*t)%mod; } ll FMMI(ll a) { ll t; t=fast_pow(a,mod-2); return t; } int main(){ int n; int a;ll x,y; int b; int q; cin >> n >> a >> b >> q; x=FMMI(a);y=FMMI(b); vector c(n); for(int c_i = 0; c_i < n; c_i++){ cin >> c[c_i]; } int i,l,r; for(int a0 = 0; a0 < q; a0++){ int queryType; int first; int second; cin >> queryType >> first >> second; if(queryType==1) { c[first]=second; } else { l=first;r=second;ll z=0,k; for(i=r;i>=l;i--) { k=((((c[i]-z)%mod)*(x))%mod); z=(k*b)%mod; } if(z==0)cout<<"Yes"<<"\n"; else cout<<"No"<<"\n"; } } return 0; }