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