#!/bin/python3 import sys mod = 10**9 + 7 n,a,b,q = input().strip().split(' ') n,a,b,q = [int(n),int(a),int(b),int(q)] c = list(map(int, input().strip().split(' '))) root = (pow(a,mod-2,mod)*(-b))%mod #print(root) powers = [] for i in range(len(c)): powers.append(pow(root,i,mod)) for a0 in range(q): queryType,first,second = input().strip().split(' ') queryType,first,second = [int(queryType),int(first),int(second)] if queryType == 1: c[first] = second else: product = 0 for i in range(second - first + 1): product += (powers[i]*c[first + i])%mod product = product%mod #print(product) #print(powers) if product == 0: print("Yes") else: print("No") # your code goes here