import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int a = in.nextInt(); int b = in.nextInt(); int q = in.nextInt(); int[] c = new int[n]; int[] copy = new int[n]; int w, ma,mb;; for(int c_i=0; c_i < n; c_i++){ c[c_i] = in.nextInt(); } for(int a0 = 0; a0 < q; a0++){ int queryType = in.nextInt(); int first = in.nextInt(); int second = in.nextInt(); // your code goes here if (queryType == 1) { c[first] = second; } else { w = second-first+1; for (int i = 0; i < w; i++) copy[i] = c[i+first]; //copy array int j = w-1; while (j > 0) { ma = a; mb = b; if (a != copy[j]) { ma = a*copy[j]; mb = b*copy[j]; for (int i = 0; i < w; i++) copy[i] *= a; } if (ma != copy[j]) System.out.println("STUPID"); copy[j-1] -= mb; j--; } if (copy[0] == 0) System.out.println("Yes"); else System.out.println("No"); } } } }