#include #include #include #include #include using namespace std; int a,b,n,q,cnt,c[100005],l,r,type,i,a1,b1,ans; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ cin >> n >> a >> b >> q ; for(i=0;i>c[i]; cnt=__gcd(a,b); a=a/cnt; b=b/cnt; while(q--) { cin >> type >> l >> r ; if(type==1) { c[l]=r; } else { if(b==0) { if(c[l]) { cout <<"No\n"; } else { cout<<"Yes"<<"\n"; //else cout <<"No\n"; } } else { for(i=l;i<=r;i++) { if(c[i]) { if(b1==0)b1=c[i]; else a1=c[i]; } if(a1!=0 and b1) { ans=__gcd(a1,b1); a1/=ans; b1/=ans; if(a1!=a or b1!=b) { cnt=1; break; } a1=b1=0; } } if(cnt)cout<<"No\n"; else cout<<"Yes\n"; } } } return 0; }