#!/bin/python3 import sys import math 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(' '))) for a0 in range(q): root = -(b/a) queryType,first,second = input().strip().split(' ') queryType,first,second = [int(queryType),int(first),int(second)] # your code goes here if queryType == 2: value = 0 if b != 0: for i in range(second-first+1): value += c[first+i]*math.pow(root, i) value = math.trunc(value) if value == 0: print("Yes") else: print("No") else: if c[first] == 0: print("Yes") else: print("No") if queryType == 1: c[first] = second