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