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