MOD = 4554013204529924683 n, q, k = map(int, input().split()) a = list(map(int, input().split())) b = [0] powk = 1 for x in a: b.append((b[-1] + x * powk) % MOD) powk = (powk * k) % MOD for i in range(q): l, r = map(int, input().split()) S = (b[r] - b[l-1]) % MOD print("Yes" if S != 0 else "No")