#include using namespace std; const int MOD = 1e9 + 7; double a,b; double mod_pow(double a, int b){ double ret = 1; while(b){ if(b & 1){ ret = ret * a; while(ret > MOD) ret -= MOD; } a = a * a; while(a > MOD) a -= MOD; b >>= 1; } while(ret > MOD) ret -= MOD; return ret; } class SegmentTree { private: vector st, A; int n; int left(int p) {return p<<1;} int right(int p) {return (p<<1) +1;} void update(int p, int L, int R, int i, int val) { if( i > R || i < L) return; if( L >= i && R <= i){ st[p] = val*(mod_pow(-b/a,i)); while(st[p] > MOD) st[p] -= MOD; return; } update(left(p), L, (L+R)/2, i, val); update(right(p),(L+R)/2+1, R, i, val); st[p] = st[right(p)] + st[left(p)]; } int query(int p, int L, int R, int i, int j) { if( i > R || j < L) return 0; if( L >= i && R <= j) return st[p]; int p1 = query(left(p), L, (L+R)/2, i,j); int p2 = query(right(p), (L+R)/2+1, R, i,j); return p1 + p2; } public: SegmentTree(const vector &_A) { A = _A; n = (int)A.size(); int l = 2*pow(2.0,floor((double)log(n) / log(2.0) + 1)); st.assign(l,0); for(int i=0; i>n>>a>>b>>q; vector c(n); for(int i=0; i>c[i]; SegmentTree st(c); while(q--) { int type; cin>>type; if(type == 1) { int pos, val; cin>>pos>>val; st.update(pos, val); } else { int l, r; cin>>l>>r; double x = st.query(l,r); if(floor(x) == 0) cout<<"Yes\n"; else cout<<"No\n"; } } }