#!/bin/python3 import sys from fractions import gcd n,a,b,q = input().strip().split(' ') n,a,b,q = [int(n),int(a),int(b),int(q)] x = a//(gcd(a,b)) b = b//(gcd(a,b)) a = x #print(a,b) c = list(map(int, input().strip().split(' '))) for a0 in range(q): queryType,first,second = input().strip().split(' ') queryType,first,second = [int(queryType),int(first),int(second)] if(queryType==1): c[first] = second else: first%=1000000007 second%=1000000007 r = c[first:second+1] #print(c) #print(r) for i in range(len(r),0,-1): #print(r[i-1]) if((r[i-1] % a )==0 and r[i-1]>=0): #print(r[i]) if((i-2)>=0): r[i-2] = r[i-2] - ((r[i-1]//a)*b) #print(r) if(i<=1): print("Yes") break else: print("No") break