#include<bits/stdc++.h>
using namespace std;
int main(){
	//write your code here......
	int n,m,a;
	int x;
	cin>>n>>m;
	map<int,int>mp;
	while(n--)
	{
		cin>>a;
		mp[a]++;
	}
	while(m--)
	{
		cin>>x;
		if(mp[x])
		{
			cout<<"yes"<<endl;
		}
		else
		{
			cout<<"no"<<endl;
		
		
		}
	}
	return 0;
}