from collections import Counter N = int(input()) A = list(map(int,input().split())) ca = Counter(A) Q = int(input()) for _ in range(Q): x,k = list(map(int,input().split())) print("Yes" if ca[x] >= k else "No")