#!/bin/python3 import sys from fractions import Fraction 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(' '))) Powers = [Fraction(1,1)] for i in range(1,n): Powers.append(Powers[-1]*Fraction(-b,a)) for a0 in range(q): queryType,first,second = input().strip().split(' ') queryType,first,second = [int(queryType),int(first),int(second)] # your code goes here if queryType == 1: c[first] = second else: if sum([Powers[m]*c[m] for m in range(n)]) == 0: print('Yes') else: print('No')