include [HTML_REMOVED]
include [HTML_REMOVED]
using namespace std;
const int N = 200003;
const int null = 0x3f3f3f3f;
int h[N]; //开放寻址法
int sfind(int x){ //在其中插入数值
int k = (x % N + N) % N;
while(h[k] != null && h[k] != x){ //找到其中的那一个空位
k++;
if(k == N) k = 0; //倒回去
}
return k;
}
int main(){
int n,a;
scanf("%d",&n);
memset(h,null,sizeof(h));
while(n--){
char op[2];
scanf("%s%d",op,&a);
int k = sfind(a);
if(op[0] == 'I'){
h[k] = a;
}else{
if(h[k] == a) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}
}
return 0;
}