def normalize(poly): while poly and poly[-1] == 0: poly.pop() if poly == []: poly.append(0) def poly_divmod(num, den): #Create normalized copies of the args num = num[:] normalize(num) den = den[:] normalize(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 range(shiftlen + 1): #Get the next coefficient of the quotient. mult = num[-1] / divisor quot = [mult] + quot #Subtract mult * den from num, but don't bother if mult == 0 #Note that when i==0, mult!=0; so quot is automatically normalized. 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) normalize(num) return quot, num def test(num, den): q, r = poly_divmod(num, den) return q, r n,a,b,q = list(map(int, input().split())) c = list(map(int, input().split())) for a0 in range(q): queryType,first,second = list(map(int, input().split())) if (queryType==1): c[first] = second else: pol_p = c[first:second+1] pol_q = [b,a] q, r = poly_divmod(pol_p, pol_q) print("Yes") if r[0]==0 else print("No")