#include #include #include #include #include #include using namespace std; typedef long long LL; typedef vector VI; #define REP(i,n) for(int i=0, i##_len=(n); i inline void amin(T &x, const T &y) { if (y inline void amax(T &x, const T &y) { if (x void rprintf(const char *fmt, Iter begin, Iter end) { for (bool sp=0; begin!=end; ++begin) { if (sp) putchar(' '); else sp = true; printf(fmt, *begin); } putchar('\n'); } template struct ModInt { unsigned x; void undef() { x = (unsigned)-1; } bool isnan() const { return x == (unsigned)-1; } inline int getInt() const { return (int)x; } template T get() const { return (T)x; } ModInt(int y=0) { if (y<0 || (int)MOD<=y) y %= (int)MOD; if (y<0) y += MOD; x=y; } ModInt(long long y) { if (y<0 || MOD<=y) y %= MOD; if (y<0) y += MOD; x=y; } ModInt(unsigned long long y) { if (MOD<=y) x = y % MOD; else x = y; } ModInt &operator+=(const ModInt &y) { if ((x += y.x) >= MOD) x -= MOD; return *this; } ModInt &operator-=(const ModInt &y) { if ((x -= y.x) & (1u<<31)) x += MOD; return *this; } ModInt &operator*=(const ModInt &y) { x = (unsigned long long)x * y.x % MOD; return *this; } ModInt &operator/=(const ModInt &y) { x = (unsigned long long)x * y.inv().x % MOD; return *this; } ModInt operator-() const { return (x ? MOD-x: 0); } ModInt inv() const { unsigned a = MOD, b = x; int u = 0, v = 1; while (b) { int t = a / b; a -= t * b; swap(a, b); u -= t * v; swap(u, v); } if (u < 0) u += MOD; return ModInt(u); } ModInt pow(long long y) const { ModInt b = *this, r = 1; if (y < 0) { b = b.inv(); y = -y; } for (; y; y>>=1) { if (y&1) r *= b; b *= b; } return r; } }; const LL MOD = 1000000007; typedef ModInt Mint; Mint operator+(Mint x, const Mint &y) { if ((x.x += y.x) >= (unsigned)MOD) x.x -= (unsigned)MOD; return x; } Mint operator-(Mint x, const Mint &y) { if ((x.x -= y.x) & (1u<<31)) x.x += (unsigned)MOD; return x; } Mint operator*(Mint x, const Mint &y) { x.x = (unsigned long long)x.x * y.x % (unsigned long long)MOD; return x; } Mint operator/(Mint x, const Mint &y) { x.x = (unsigned long long)x.x * y.inv().x % (unsigned long long)MOD; return x; } bool operator<(const Mint &x, const Mint &y) { return x.x < y.x; } bool operator==(const Mint &x, const Mint &y) { return x.x == y.x; } bool operator!=(const Mint &x, const Mint &y) { return x.x != y.x; } struct Seg { static Mint P; Mint val; int len; Seg() : val(0), len(0) {} Seg(int val_): val(val_), len(1) {} }; Mint Seg::P; Seg operator*(const Seg &x, const Seg &y) { // TODO: do stuff something Seg z; z.len = x.len + y.len; z.val = x.val + y.val * Seg::P.pow(x.len); return z; }; const Seg unit = Seg(); struct SegmentTree { int n; vector d; SegmentTree(int n_=0): n(n_), d(2*n) { } SegmentTree(const vector & d_): n(d_.size()), d(2*n) { for (int i=0; i>=1, y>>=1) { if (y & 1) rs = d[--y] * rs; if (x & 1) ls = ls * d[x++]; } return ls * rs; } }; int N; int A, B, Q; int C[100111]; int main() { scanf("%d%d%d%d", &N, &A, &B, &Q); REP (i, N) scanf("%d", C+i); Seg::P = (MOD - B) * Mint(A).inv(); SegmentTree ST(N); REP (i, N) ST.modify(i, C[i]); REP ($, Q) { char o[11]; scanf("%s", o); if (*o == '1') { int I, X; scanf("%d%d", &I, &X); ST.modify(I, X); } else { int L, R; scanf("%d%d", &L, &R); R++; bool yes = (ST.query(L, R).val == 0); puts(yes? "Yes": "No"); } } return 0; }