#!/bin/python3 import sys def calculateFunc(l,r, xVal): sumVal=0 for i in range(r-l+1): sumVal+=c[l+i]*(xVal**i) return sumVal #get initial four values n a b q n,a,b,q = input().strip().split(' ') n,a,b,q = [int(n),int(a),int(b),int(q)] value= -b/a #get the list of initial sequence c c = list(map(int, input().strip().split(' '))) #get the remaining queries for a0 in range(q): queryType,first,second = input().strip().split(' ') queryType,first,second = [int(queryType),int(first),int(second)] # switching i with x if queryType==1: c[first]=second else: check=calculateFunc(first, second, value) #print(str(check)) if check % (10**9 +7) ==0: print("Yes") else: print("No")