#include #include using namespace std; using namespace atcoder; using ll = long long; struct S{ bool ex; ll base; ll sum; ll st; ll mx_val; }; S e() { return {true, 0, 0, 0, 1}; } S w() { return {false, -1, 0, -1, -1}; } S op(S a, S b) { S res; res.ex = true; if(!a.ex || !b.ex){ return w(); } if(a.base == 0){ return b; } if(b.base == 0){ return a; } if(a.base != b.base){ return w(); } else res.base = a.base; ll d = abs((a.sum - a.st) + b.st); ll mn = min(a.mx_val, b.mx_val); if(d % mn != 0)return w(); if(a.mx_val < b.mx_val){ res.mx_val = b.mx_val; res.st = b.st + a.sum; } else { res.mx_val = a.mx_val; res.st = a.st; } res.sum = a.sum + b.sum; return res; } void main_() { int n,q; cin >> n >> q; vector p(n); for(int i = 0; i < n; i++){ ll a; cin >> a; ll a_tmp = a; while(a_tmp % 2 == 0)a_tmp /= 2; p[i].base = a_tmp; p[i].ex = true; p[i].sum = a / a_tmp; p[i].st = 0; p[i].mx_val = a / a_tmp; } segtree seg(p); for(int i = 0; i < q; i++){ int t; cin >> t; if(t == 1){ int k; cin >> k; k--; ll x; cin >> x; S xs; ll x_tmp = x; while(x_tmp % 2 == 0)x_tmp /= 2; xs.base = x_tmp; xs.ex = true; xs.sum = x / x_tmp; xs.st = 0; xs.mx_val = x / x_tmp; seg.set(k,xs); } if(t == 2){ int l,r; cin >> l >> r; l--; S ans = seg.prod(l,r); bool ok = ans.ex; if(ans.st % ans.mx_val != 0 || (ans.sum - ans.st) % ans.mx_val != 0)ok = false; if(ok){ cout << "Yes" << endl; } else { cout << "No" << endl; } } } }; int main() { int t = 1; // cin >> t; while(t--) main_(); return 0; }