#include using namespace std; #define PI acos(-1) #define fi first #define se second #define pb push_back #define sz(a) (int)(a).size() #define all(c) (c).begin(), (c).end() #define TIMESTAMP fprintf(stderr, "Execution time: %.3lf s.\n", (double)clock()/CLOCKS_PER_SEC) typedef long long ll; typedef long double ld; typedef vector vi; typedef vector vll; typedef pair pii; typedef vector vvi; typedef vector vpii; typedef vector vs; const int INF = 100500; const int MAXN = 1e5 + 9; ll base = 1e9 + 7; ll MOD = 1e9 + 7; ll n, a, b, q; ll aa[MAXN]; void input() { cin >> n >> a >> b >> q; MOD = MOD * a + b; for(int i = 0; i < n; i++) cin >> aa[i]; } void solve() { while(q--) { int type, l, r; cin >> type >> l >> r; if(type == 1) aa[l] = r; else { ll ans = aa[r]; for(int i = r - 1; i >= l; i--) ans = (ans * base + aa[i]) % MOD; if(ans) cout << "No\n"; else cout << "Yes\n"; } } } int main() { #ifdef LOCAL freopen("xxx.in", "r", stdin); freopen("xxx.out", "w", stdout); #else //freopen("xxx.in", "r", stdin); //freopen("xxx.out", "w", stdout); #endif input(); solve(); return 0; }