#!/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): qt,f,s = map(int,raw_input().strip().split(' ')) if(qt==1): c[f]=s else: var=0 for i in range(f,s+1): var=var+c[i]*pow((-b)*1.0/a,i-f) #print var,c if(var%1000000007==0): print "Yes" else: print "No"