author="himanshu malhotra" aa,bb=500,500 def normalise(poly): while poly and poly[-1] == 0: poly.pop() if poly == []: poly.append(0) def polynomial_division(num, den): #Create normalised copies of the args num = num[:] normalise(num) den = den[:] normalise(den) if len(num) >= len(den): #Shift den towards right so it's the same degree as num shiftlen = len(num) - len(den) den = [0] * shiftlen + den else: return [0], num quot = [] divisor = float(den[-1]) for i in xrange(shiftlen + 1): #Get the next coefficient of the quotient. mult = num[-1] / divisor quot = [mult] + quot if mult != 0: d = [mult * u for u in den] num = [u - v for u, v in zip(num, d)] num.pop() den.pop(0) normalise(num) return num author="himanshu malhotra" aa,bb=500,500 n,a,b,q=map(int,raw_input().split()) li=map(int,raw_input().split()) den=[b,a] for _ in xrange(q): x,y,z=map(int,raw_input().split()) if x==1: li[y]=z else: #print li num=[] for i in xrange(y,z+1): num.append(li[i]) num=num[::-1] if polynomial_division(num,den)==[0]: print "Yes" else: print "No"