#include<iostream> #include<cstdio> using namespace std; const int MAXN=101; int main(){ int n,m; int a[MAXN]; int b[MAXN]; while(scanf("%d",&n)!=EOF){ for(int i=0;i<n;++i){ scanf("%d",&a[i]); } scanf("%d",&m); for(int i=0;i<m;++i){ scanf("%d",&b[i]); } for(int i=0;i<m;++i){ int j=0; for(j;j<n;++j){ if(a[j]==b[i]){ cout<<"YES"<<endl; break; } } if(j==n){ cout<<"NO"<<endl; } } } return 0; }