#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
int n = 0 , q = 0;
cin >> n ;
vector<int> vec(n) ;
for(int i = 0 ; i < n ; i++)
{
cin >> vec[i] ;
}
sort(vec.begin(),vec.end());
vector<int>::iterator it ;
cin >> n ;
for(int i = 0 ; i < n ; i++)
{
cin >> q ;
it=std::lower_bound (vec.begin(),vec.end(), q);
if( vec[it-vec.begin()] == q)
{
cout<<"Yes "<<(it-vec.begin()+1)<<endl;
}
else
{
cout<<"No "<<(it-vec.begin()+1)<<endl;
}
}
return 0;
}