#include<bits/stdc++.h>
#include<map>
using namespace std;
int main(){
	//write your code here......
	map<int,string>ma;
    int n,m,x;
    cin>>n>>m;
    while(n--)
    {
        cin>>x;
        ma.insert(pair<int ,string>(x,"yes"));
    }
    while(m--)
    {
        cin>>x;
        auto it=ma.find(x);
        if(it==ma.end()){cout<<"no"<<endl;}
        else{
            cout<<"yes"<<endl;
        }
    }
	return 0;
}