#include #include #include #include #include #include #include int main(){ long long int paa= pow(10,9)+7; long long int n; long long int a; long long int b; long long int q,sum=0; scanf("%lld %lld %lld %lld",&n,&a,&b,&q); int *c = malloc(sizeof(int) * n); for(int c_i = 0; c_i < n; c_i++){ scanf("%d",&c[c_i]); } for(int a0 = 0; a0 < q; a0++){ sum=0; long long int queryType; long long int first,l; long long int second,r; scanf("%lld %lld %lld",&queryType,&first,&second); l=first; r=second; // your code goes here if (queryType==1) c[first]=second; else { double pop = -(b/a); for (int i=l;i<=r;i++) { sum+= ((((long long int)pow(pop,i-l))%paa) *(c[i]%paa)); } if(sum==0) printf ("Yes\n"); else printf ("No\n"); } } return 0; }