def norm(poly): py = poly[:] while not py[-1]: py.pop() return py def deg(poly): return len(norm(poly))-1 def psum(a,b,p): la,lb = len(a),len(b) if la > lb: b += [0]*(la-lb) else: a += [0]*(lb-la) return norm([(i+j) % p for i,j in zip(a,b)]) def pdiff(a,b,p): la,lb = len(a),len(b) if la > lb: b += [0]*(la-lb) else: a += [0]*(lb-la) return norm([(i-j) % p for i,j in zip(a,b)]) p = 10**9 + 7 n,a,b,q = [int(x) for x in input().split()] c = [int(x) for x in input().split()] ainv = pow(a,p-2,p) binv = pow(b,p-2,p) for _ in range(q): qtype,first,second = [int(x) for x in input().split()] if qtype == 1: c[first] = second elif qtype == 2: if a == b == 0: print('No') break poly = c[first:second+1] while not poly[-1]: poly.pop() quot = [0]*len(poly) rem = poly[:] d = deg(rem) while d >= 1: temp = norm([0]*(d-1)+[(rem[-1]*ainv) % p]) quot = psum(quot,temp,p) temp.append(temp[-1]) temp[-2] = (temp[-2]*b) % p temp[-1] = (temp[-1]*a) % p temp = norm(temp) rem = pdiff(rem,temp,p) d = deg(rem) if d == -1: print('Yes') else: print('No')