import java.io.*; import java.util.*; import java.math.BigInteger; import java.util.Map.Entry; import static java.lang.Math.*; public class Solution extends PrintWriter { long modN = 1_000_000_007; long[] modP; class Node { int f, t; Node l, r, p; long[] val; int len; Node(int i, long a) { this.f = this.t = i; this.val = new long[] { a }; this.len = 1; } Node(Node l, Node r) { this.l = l; this.r = r; l.p = r.p = this; this.f = l.f; this.t = r.t; len = l.len + r.len; update(); } long[] get(int from, int to) { if (to < from || t < from || to < f) { return null; } if (from <= f && t <= to) { return rem(mul(val, pow(new long[] { 0, 1 }, to - t, modP)), modP); } long[] lval = l.get(from, to); long[] rval = l.get(from, to); if (lval == null) { return rval; } if (rval == null) { return lval; } return rem(add(lval, rval), modP); } void update() { if (l != r) { this.val = rem(add(mul(l.val, pow(new long[] { 0, 1 }, r.len, modP)), r.val), modP); } if (p != null) { p.update(); } } } void run() { int n = nextInt(); long a = nextLong(), b = nextLong(); modP = new long[] { b, a }; int q = nextInt(); Node[] node = new Node[n]; Node[] tree = new Node[n]; for (int i = 0; i < n; i++) { node[i] = tree[i] = new Node(i, nextLong()); } { int m = n; while (m > 1) { int k = 0; for (int i = 1; i < m; i += 2) { tree[k++] = new Node(tree[i - 1], tree[i]); } if (m % 2 == 1) { tree[k++] = tree[m - 1]; } m = k; } } Node root = tree[0]; while (--q >= 0) { int t = nextInt(); if (t == 1) { int i = nextInt(); long x = nextLong(); node[i].val = new long[] { x }; node[i].update(); } else { int l = nextInt(), r = nextInt(); long[] rem = root.get(l, r); if (rem != null && isZero(rem)) { println("Yes"); } else { println("No"); } } } } long pow(long a, long b) { long c = 1; for (; b > 0; b /= 2) { if (b % 2 == 1) { c = (c * a) % modN; } a = (a * a) % modN; } return c; } long[] trimLeadingZeros(long[] poly) { int nz = poly.length - 1; while (nz > 0 && poly[nz] == 0) { --nz; } return Arrays.copyOf(poly, Math.max(nz, 0) + 1); } long[] add(long[] x, long[] y) { int n = x.length; int m = y.length; int k = Math.max(n, m); long[] z = new long[k]; for (int i = 0; i < k; i++) { if (i < n) { z[i] = (z[i] + x[i]) % modN; } if (i < m) { z[i] = (z[i] + y[i]) % modN; } } return trimLeadingZeros(z); } long[] sub(long[] x, long[] y) { int n = x.length; int m = y.length; int k = Math.max(n, m); long[] z = new long[k]; for (int i = 0; i < k; i++) { if (i < n) { z[i] = (z[i] + x[i] + modN) % modN; } if (i < m) { z[i] = (z[i] - y[i] + modN) % modN; } } return trimLeadingZeros(z); } public long[] mul(long[] x, long[] y) { int n = x.length; int m = y.length; long[] z = new long[n + m]; for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { int k = i + j; z[k] = (z[k] + x[i] * y[j]) % modN; } } return trimLeadingZeros(z); } public long[] rem(long[] x, long[] y) { int n = x.length; int m = y.length; int k = n - m; if (k < 0) { return x; } long[] z = x.clone(); for (int i = 0; i <= k; i++) { long a = y[m - 1]; long b = z[n - 1 - i]; long d = (b * pow(a, modN - 2)) % modN; for (int j = 0; j < m; j++) { long c = (d * y[m - 1 - j]) % modN; z[n - 1 - i - j] = (z[n - 1 - i - j] - c + modN) % modN; } } return trimLeadingZeros(z); } public long[] pow(long[] x, long power, long[] m) { long[] r = { 1 }; for (; power > 0; power /= 2) { if (power % 2 == 1) { r = rem(mul(r, x), m); } x = rem(mul(x, x), m); } return trimLeadingZeros(r); } public boolean isZero(long[] x) { return x.length == 1 && x[0] == 0; } public static boolean nextPermutation(int[] permutation) { int n = permutation.length, a = n - 2; while (0 <= a && permutation[a] >= permutation[a + 1]) { a--; } if (a == -1) { return false; } int b = n - 1; while (permutation[b] <= permutation[a]) { b--; } swap(permutation, a, b); for (int i = a + 1, j = n - 1; i < j; i++, j--) { swap(permutation, i, j); } return true; } public static void swap(int[] array, int i, int j) { if (i == j) { return; } array[i] ^= array[j]; array[j] ^= array[i]; array[i] ^= array[j]; } int[][] nextMatrix(int n, int m) { int[][] matrix = new int[n][m]; for (int i = 0; i < n; i++) for (int j = 0; j < m; j++) matrix[i][j] = nextInt(); return matrix; } String next() { while (!tokenizer.hasMoreTokens()) tokenizer = new StringTokenizer(nextLine()); return tokenizer.nextToken(); } boolean hasNext() { while (!tokenizer.hasMoreTokens()) { String line = nextLine(); if (line == null) { return false; } tokenizer = new StringTokenizer(line); } return true; } int[] nextArray(int n) { int[] array = new int[n]; for (int i = 0; i < n; i++) { array[i] = nextInt(); } return array; } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } String nextLine() { try { return reader.readLine(); } catch (IOException err) { return null; } } public Solution(OutputStream outputStream) { super(outputStream); } static BufferedReader reader; static StringTokenizer tokenizer = new StringTokenizer(""); static Random rnd = new Random(); public static void main(String[] args) throws IOException { reader = new BufferedReader(new InputStreamReader(System.in)); Solution solution = new Solution(System.out); solution.run(); solution.close(); reader.close(); } }