#include #include #include #include #include #include #include int gcd(int a,int b) { if(b==0) return a; else return gcd(b,a%b); } int main(){ int n; int a,i; int b,p; float k; int q; scanf("%d %d %d %d",&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++){ int queryType; int first; int second; scanf("%d %d %d",&queryType,&first,&second); // your code goes here if(queryType==1) { c[first]=second; } if(queryType==2) { p=0; k=-(b*0.1)/(a*0.1); for(i=first;i<=second;i++) { p=p+c[i]*pow(k,(i-first)); } if(p!=0) printf("No\n"); else { if(a>b) k=gcd(a,b); else k=gcd(b,a); a=a/k; if(c[second]%a==0) printf("Yes\n"); else printf("No\n"); } } } return 0; }