#include <bits/stdc++.h> #define INF 0x3f3f3f3f using namespace std; int main(){ int n,m,tmp; vector<int> a,b; cin>>n; for(int i = 0; i < n; i++){ cin>>tmp; a.push_back(tmp); } cin>>m; for(int i = 0; i < m; i++){ cin>>tmp; b.push_back(tmp); } for(int i = 0; i < m; i++){ if(count(a.begin(),a.end(),b[i]) != 0) cout<<"YES"<<endl; else cout<<"NO"<<endl; } }