include[HTML_REMOVED]
using namespace std;
include [HTML_REMOVED]
const int N = 1e5+3, null = 0x3f3f3f3f;
int h[N];
int find(int x);
void insert(int x) {
int k = find(x);
h[k] = x;
}
int find(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;cin>>n;
memset(h, 0x3f, sizeof h);
while(n–) {
string op;cin>>op;
int x;cin>>x;
if(op==”I”) insert(x);
else {
int k = find(x);
if(h[k]!=null) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}
}
}