#!/bin/python import sys n,a,b,q = raw_input().strip().split(' ') n,a,b,q = [int(n),int(a),int(b),int(q)] c = map(int, raw_input().strip().split(' ')) for a0 in xrange(q): querytype,first,second = raw_input().strip().split(' ') querytype,first,second = [int(querytype),int(first),int(second)] # your code goes here if(querytype==1): c[first]=second else: var=0 for i in range(first,second+1): var=var+c[i]*pow((-b)*1.0/a,i-first) if(var%1000000007==0): print "Yes" else: print "No"