#include #define sd(x) scanf("%d",&x) #define sd2(x,y) scanf("%d%d",&x,&y) #define sd3(x,y,z) scanf("%d%d%d",&x,&y,&z) #define fi first #define se second #define pb push_back #define mp make_pair #define foreach(it, v) for(auto it=(v).begin(); it != (v).end(); ++it) #define _ ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define __ freopen("input.txt","r",stdin);freopen("output.txt","w",stdout); #define tr(...) cout<<__FUNCTION__<<' '<<__LINE__<<" = ";trace(#__VA_ARGS__, __VA_ARGS__) using namespace std; typedef long long ll; typedef long double ld; typedef pair pii; template ostream& operator<<(ostream& out,pair const& p){out<<'('< ostream& operator<<(ostream& out,vector const& v){ int l=v.size();for(int i=0;i0)out< void trace(const char* name, T&& arg1){cout< void trace(const char* names, T&& arg1, Args&&... args){ const char* comma = strchr(names + 1, ',');cout.write(names, comma-names)<<" : "<>= 1; } return ret; } ll n, a, b, q; ll c[N]; int main(){ _ cin >> n >> a >> b >> q; for(int i = 0; i < n; i++){ cin >> c[i]; } while(q--){ int t; cin >> t; if(t == 1){ ll i, x; cin >> i >> x; c[i] = x; } else{ ll l, r; cin >> l >> r; ll want = c[r] * fast(a, MOD-2) % MOD; ll get = 0; ll mul = 1; ll alpha = a * fast(b, MOD-2) % MOD; for(int i = r-1, j = 0; i >= l; i--, j++){ if(j%2 == 0){ get += c[i] * mul % MOD; get %= MOD; } else{ get -= c[i] * mul % MOD; get %= MOD; if(get < 0) get += MOD; } mul = mul * alpha % MOD; } get = get * fast(b, MOD-2) % MOD; // tr(get); if(get == want) cout << "Yes" << endl; else cout << "No" << endl; } } return 0; }