import java.io.*; import java.util.HashMap; import java.util.Map; import java.util.StringTokenizer; public class Main { public static void main(String[] args) { int n = sc.nextInt(); Map map = new HashMap(); for (int i = 0; i < n; i++) { int d = sc.nextInt(); map.put(d, map.getOrDefault(d, 0) + 1); } int q = sc.nextInt(); for (int i = 0; i < q; i++) { int x = sc.nextInt(), k = sc.nextInt(); int cnt = map.getOrDefault(x, 0); out.println(cnt >= k ? "Yes" : "No"); } out.close(); } static Kattio sc = new Kattio(); static PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))); static class Kattio { static BufferedReader r; static StringTokenizer st; public Kattio() { r = new BufferedReader(new InputStreamReader(System.in)); } public String next() { try { while (st == null || !st.hasMoreTokens()) { st = new StringTokenizer(r.readLine()); } return st.nextToken(); } catch (Exception e) { return null; } } public int nextInt() { return Integer.parseInt(next()); } public long nextLong() { return Long.parseLong(next()); } public double nextDouble() { return Double.parseDouble(next()); } } }