#55407: c++ org BS


61247091s@gapps.ntnu.edu.tw (wei)


#include <bits/stdc++.h>
using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int n,q;
    cin>>n>>q;

    vector <int> v(n);
    for(int i=0;i<n;i++)cin>>v[i];

    while(q--){
        int t;
        cin>>t;
        bool tmp=false;
        int low=0,high=n-1;
        while(low<=high){
        int mid=low+(high-low)/2;
        if(t==v[mid]){
            cout<<"Yes\n";tmp=true;break;
        }
        else if(t<v[mid])high=mid-1;
        else if(t>v[mid])low=mid+1;
    }
        if(!tmp)cout<<"No\n";
    }
    return 0;
}