from collections import Counter n = int(input()) a = list(map(int, input().split())) c = Counter(a) q = int(input()) for i in range(q): x, k = map(int, input().split()) print("Yes" if c[x] >= k else "No")