#!/bin/python import sys points = range(1,2) mm = 10**9 +7 def evaluate(a,k,l): res = {} for p in points: res[p] = 0 if p == 0 : res[p] = a[k] continue for i in xrange(k,l+1): c = i-k res[p] = (res[p]+ int(a[i]*(p**c))) return res n,a,b,q = map(int,raw_input().strip().split(' ')) c = map(int, raw_input().strip().split(' ')) for a0 in xrange(q): queryType,first,second = map(int,raw_input().strip().split(' ')) if queryType == 1: c[first] = second elif queryType == 2: e1 = evaluate(c,first,second) e2 = evaluate([b,a],0,1) for e in e1.keys(): if e2[e] == 0: continue if e1[e] % e2[e] != 0 : print('No') break else: print('Yes')