#!/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: if n < 2: print('No') high = 10**9+7 for i in range(2,high): if (a*i) % high == c[2]: print('Yes') print('No')