#include<iostream>
#include<cmath>
#include<map>
using namespace std;
map<int, int> s;

int a[100001];
int main()
{
	int n; cin >> n;
	for(int i = 1; i <= n; ++ i)
	{
		int x; cin >> x;
		 s[x] = 1;
	}
	int q; cin >> q;
	for(int i = 1; i <= q; ++ i)
	{
		int x; cin >> x;
		if(s[x] == 1) cout << "Yes\n";
		else cout << "No\n";
	}
	return 0;
}
/*
5
100000000 3 6 5 9
5
8 6 5 100000000 100000001
*/
