#include <bits/stdc++.h>
using namespace std;
map<int,bool>f;
int n,a;
char m;
int main()
{
scanf("%d",&n);
for(;n--;)
{
scanf("\n%c%d",&m,&a);
if(m=='I')f[a]=true;
else if(f[a])printf("Yes\n");
else printf("No\n");
}
return 0;
}
牛逼!!!