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

	int n, m, x, a;
	cin >> n >> m;
	while (n--) {
		cin >> a;
		freq[a]++;
	}

	while (m--) {
		cin >> x;
		if (freq[x]) {
			cout << "yes" << endl;
		} else {
			cout << "no" << endl;
		}
	}
	return 0;
}