#include using namespace std; using ll = long long; const ll mod = 1e9 + 7; const int N = 200005; const int INF = 0x3f3f3f3f; int main() { int n; cin >> n; map mp; for (int i = 0; i < n; i++) { int x; cin >> x; mp[x]++; } int q; cin >> q; while (q--) { int x, k; cin >> x >> k; if (mp.count(x) && mp[x] >= k) { cout << "Yes\n"; } else { cout << "No\n"; } } return 0; }