#include using namespace std; using ll = long long; #define rep(i, s, t) for (ll i = s; i < (ll)(t); i++) #define rrep(i, s, t) for(ll i = (ll)(t) - 1; i >= (ll)(s); i--) #define all(x) begin(x), end(x) #define rall(x) rbegin(x), rend(x) #define TT template TT using vec = vector; template bool chmin(T1 &x, T2 y) { return x > y ? (x = y, true) : false; } template bool chmax(T1 &x, T2 y) { return x < y ? (x = y, true) : false; } struct io_setup { io_setup() { ios::sync_with_stdio(false); std::cin.tie(nullptr); cout << fixed << setprecision(15); } } io_setup; void solve(){ int N; cin>>N; vectorA(N); mapmp; rep(i,0,N){ cin>>A[i]; mp[A[i]]++; } int Q; cin>>Q; while(Q--){ int x,k; cin>>x>>k; if(mp[x]>=k)cout<<"Yes\n"; else cout<<"No\n"; } } int main() { solve(); }