from collections import* (n,),a,(q,),*e=[[*map(int,s.split())]for s in open(0)] c=Counter(a) for x,k in e: if c[x]>=k: print('Yes') else: print('No')