#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define pb push_back using namespace std; typedef long long ll; const int N = 100000, mod = 1000000007; int n, q, a, b, c[N+5], term[N+5]; int seg[4*N+5]; int init(int i, int b, int s) { if (b == s) return seg[i] = (ll) c[b] * term[b] % mod; int o = (b + s) / 2; return seg[i] = (init(2*i, b, o) + init(2*i+1, o+1, s)) % mod; } int update(int i, int b, int s, int x, int y) { if (x < b || x > s) return seg[i]; if (b == s) { c[x] = y; return seg[i] = (ll) c[b] * term[b] % mod; } int o = (b + s) / 2; return seg[i] = (update(2*i, b, o, x, y) + update(2*i+1, o+1, s, x, y)) % mod; } int query(int i, int b, int s, int x, int y) { if (x > s || y < b) return 0; if (x <= b && y >= s) return seg[i]; int o = (b + s) / 2; return (query(2*i, b, o, x, y) + query(2*i+1, o+1, s, x, y)) % mod; } int expo(int n, int m) { if (m == 0) return 1; int t = expo(n, m / 2); t = (ll) t * t % mod; if (m % 2) t = (ll) t * n % mod; return t; } int inv(int x) { return expo(x, mod-2); } int main() { int cmd, x, y; scanf("%d %d %d %d", &n, &a, &b, &q); int t = (ll) (mod-b) * inv(a) % mod; term[0] = 1; for (int i = 1; i <= N; i++) term[i] = (ll) term[i-1] * t % mod; for (int i = 1; i <= n; i++) { scanf("%d", c+i); } init(1, 1, n); while (q--) { scanf("%d %d %d", &cmd, &x, &y); if (cmd == 1) { x++; update(1, 1, n, x, y); } else { x++, y++; int sum = (ll) query(1, 1, n, x, y) * inv(term[x]) % mod; if (sum == 0) puts("Yes"); else puts("No"); } } return 0; }