#include<bits/stdc++.h>
#include <map>
using namespace std;
int main(){
	//write your code here......
	int n, m, a, x;
	cin >> n;
	cin >> m;

	map<int , int> mp;
	for (int i = 0; i < n; i++)
	{
		cin >> a;
		mp[a] = a;
	}
	for (int i = 0; i < m; i++)
	{
		cin >> x;
		auto it = mp.find(x);

		if (it != mp.end())
			cout << "yes" << endl;
		else
			cout << "no" << endl;
	}
	return 0;
}