//g++ 5.4.0
#include
#include
using namespace std;
template
bool bin_s(const Iter begin, const Iter end, const T& val)
{
Iter i = std::lower_bound(begin, end, val);
if (i != end && !(val < *i))
return true;
else
return false;
}
int main()
{
size_t N, M;
cin >> N >> M;
vector v1(N);
vector v2(M);
for (size_t i = 0; i < N; ++i)
cin >> v1[i];
for (size_t i = 0; i < M; ++i)
{
cin >> v2[i];
if ( bin_s(v1.begin(), v1.end(), v2[i]) )
cout << "YES" << endl;<br> else
cout << "NO" << endl;<br> }
}