#include<cstdio>
#include <algorithm>
#include <string>
#include <iostream>
#include <cstring>
using namespace std;
const int MAXN = 100 + 10;
int arr[MAXN];
bool LinearSearch(int n,int target){
for(int i = 0;i < n; ++i){
if(target == arr[i]){
return true;
}
}
return false;
}
int main() {
int n;
scanf("%d",&n);
for(int i = 0;i < n; ++i){
scanf("%d",&arr[i]);
}
//进行m次查找
int m;
scanf("%d",&m);
while(m--){
int target; //查找目标值
scanf("%d",&target);
if(LinearSearch(n,target)){
printf("YES\n");
}else{
printf("NO\n");
}
}
return 0;
}