#include using namespace std; long long c[110000]; const int mod = 1e9 + 7; long long bin_pow(long long a, long long p){ if (p == 0) return 1; if (p % 2) return a * bin_pow(a, p - 1) % mod; long long kek = bin_pow(a, p / 2); return kek * kek % mod; } int main() { int n, q; long long a, b; cin >> n >> a >> b >> q; for (int i = 0; i < n; i++) cin >> c[n - 1 - i]; for (int it = 0; it < q; it++){ int t; cin >> t; if (t == 1){ int x, y; cin >> x >> y; c[n - 1 - x] = y; } else{ int l, r; cin >> l >> r; l = n - 1 - l, r = n - 1 - r; if (l > r) swap(l, r); long long x = c[l] * bin_pow(a, mod - 2) % mod; for (int i = l + 1; i < r; i++){ x = (c[i] - b * x % mod + mod) % mod * bin_pow(a, mod - 2) % mod; } if (x == c[r] * bin_pow(b, mod - 2) % mod){ cout << "Yes\n"; } else{ cout << "No\n"; } } } return 0; }