import sys
d={}
for e in sys.stdin.readlines()[1:]:
 if'i'==e[0]:d[e[7:]]=0
 else:print(['no','yes'][e[5:]in d]) import sys sys d={} d {} for e in sys.stdin.readlines()[1:]:
 if'i'==e[0]:d[e[7:]]=0
 else:print(['no','yes'][e[5:]in d]) e sys.stdin.readlines()[1:] sys.stdin.readlines() sys.stdin.readlines sys.stdin sys stdin readlines 1: 1 if'i'==e[0]:d[e[7:]]=0
 else:print(['no','yes'][e[5:]in d]) 'i'==e[0] 'i' e[0] e 0 d={} {} d
import sys
d={}
for e in sys.stdin.readlines()[1:]:
 if'i'==e[0]:d[e[7:]]=0
 else:print(['no','yes'][e[5:]in d])
