#include #include #include #include #include #include #include #include #include #include #include #include #include #define mp make_pair #define pb push_back typedef long long ll; typedef long double ld; using namespace std; const ll MOD = 1e9 + 7; const int MAXN = 120000; const int MX = MAXN; ll c[MAXN]; ll pw[MX]; ll rmq[MAXN * 4]; int n; int q; ll a, b; ll pw2(ll a, ll b) { ll ans = 1; while (b) { while (!(b & 1)) b >>= 1, a = (a * a) % MOD; --b, ans = (ans * a) % MOD; } return ans; } void build(int v, int tl, int tr) { if (tl + 1 == tr) { rmq[v] = c[tl]; return; } int m = (tl + tr) >> 1; build(v * 2 + 1, tl, m); build(v * 2 + 2, m, tr); rmq[v] = (rmq[v * 2 + 1] + pw[m - tl] * rmq[v * 2 + 2]) % MOD; } void upd(int v, int tl, int tr, int x) { if (tl + 1 == tr) { rmq[v] = c[tl]; return; } int m = (tl + tr) >> 1; if (x < m) upd(v * 2 + 1, tl, m, x); else upd(v * 2 + 2, m, tr, x); rmq[v] = (rmq[v * 2 + 1] + pw[m - tl] * rmq[v * 2 + 2]) % MOD; } ll get(int v, int tl, int tr, int l, int r) { if (r <= tl || tr <= l) return 0; if (l <= tl && tr <= r) { return rmq[v]; } int m = (tl + tr) >> 1; int cr = max(0, m - max(l, tl)); return (get(v * 2 + 1, tl, m, l, r) + pw[cr] * get(v * 2 + 2, m, tr, l, r)) % MOD; } int main() { scanf("%d%lld%lld%d", &n, &a, &b, &q); ll x = pw2(a, MOD - 2); a = (x * a) % MOD; b = (x * b) % MOD; for (int i = 0; i < n; ++i) scanf("%lld", c + i); b = (MOD - b) % MOD; pw[0] = 1; for (int i = 1; i < MX; ++i) pw[i] = (pw[i - 1] * b) % MOD; build(0, 0, n); for (int i = 0; i < q; ++i) { int t; scanf("%d", &t); if (t == 1) { int x; ll y; scanf("%d%lld", &x, &y); c[x] = y; upd(0, 0, n, x); } else { int l, r; scanf("%d%d", &l, &r); ++r; ll x = get(0, 0, n, l, r); if (x == 0) { printf("Yes\n"); } else { printf("No\n"); } } } return 0; }