import sys input = sys.stdin.readline n,q,k=map(int,input().split()) A=list(map(int,input().split())) LR=[list(map(int,input().split())) for i in range(q)] mod1=998244353 mod2=67280421310721 S=[0] S2=[0] x=1 x2=1 for a in A: S.append((S[-1]+a*x)%mod1) S2.append((S2[-1]+a*x2)%mod2) x=x*k%mod1 x2=x2*k%mod2 for l,r in LR: p=(S[r]-S[l-1])%mod1 q=(S2[r]-S2[l-1])%mod1 if p==q==0: print("No") else: print("Yes")