#!/bin/python3 import sys 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(' '))) 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: x = 4 qx = a * x + b px = 0 for i in range(first,second+1): px += c[i] * x**(i-first) if px % qx != 0: print('No') else: print('Yes')