#include #include #include #include #include #include #include #define ll long long #define INF 2000000000 #define NINF -2000000000 #define M 1000000007 #define br '\n' using namespace std; int fast_pow(long long base,long long n) { if(n==0) return 1; if(n==1) return base; long long halfn=fast_pow(base,n/2); if(n%2==0) return(halfn*halfn)%M; else return(((halfn*halfn)%M)*base)%M; } int findMMI_fermat(int n) { return fast_pow(n,M-2); } int main() { ios_base::sync_with_stdio(false); cin.tie(0); //freopen("input.txt","r",stdin); //freopen("output.txt","w",stdout); ll n,a,b,q; cin>>n>>a>>b>>q; ll c[n]; for(int i=0;i>c[i]; ll type,i,x,l,r,d; ll inv_a=findMMI_fermat(a); //int inv_b=findMMI_fermat(b); while(q--) { cin>>type; if(type==1) { cin>>i>>x; c[i]=x; } else { cin>>l>>r; int size=r-l+1; ll temp[size]; temp[size-1]=c[r]; for(int j=r;j>l;j--) { d=(temp[j-l]*inv_a)%M; temp[j-l-1]=((c[j-1])-((b*d)%M))%M; } if(temp[0]==0) cout<<"Yes"<