#!/bin/python3 Mod = 1000000007 def invm(m, n): nn = n x = 0 y = 1 while m != 0: x, y = y, x - (n // m) * y n, m = m, n % m while x < 0: x += nn return x n, a, b, T = map(int, input().strip().split(' ')) c = list(map(int, input().strip().split(' '))) z = (Mod - b) * invm(a, Mod) % Mod def test(l,r): res = 0 for i in range(r, l-1, -1): res = (res * z + c[i]) % Mod return not res for t in range(T): queryType, first, second = map(int, input().strip().split(' ')) if queryType == 1: c[first] = second elif test(first, second): print("Yes") else: print("No")