import sys
readline = sys.stdin.readline
SET = set()
input()
for s in sys.stdin:
    if s[0] == "i":
        SET.add(s[7:])
    elif s[0] == "f":
        print("yes" if s[5:] in SET else "no")
 import sys sys readline = sys.stdin.readline readline sys.stdin.readline sys.stdin sys stdin readline SET = set() SET set() set input() input for s in sys.stdin:
    if s[0] == "i":
        SET.add(s[7:])
    elif s[0] == "f":
        print("yes" if s[5:] in SET else "no") s sys.stdin sys stdin if s[0] == "i":
        SET.add(s[7:])
    elif s[0] == "f":
        print("yes" if s[5:] in SET else "no") s[0] == "i" s[0] s 0 "i" SET.add(s[7:]) SET.add SET add s[7:] s 7: 7 elif s[0] == "f":
        print("yes" if s[5:] in SET else "no") s[0] == "f" s[0] s 0 "f" print("yes" if s[5:] in SET else "no") print "yes" if s[5:] in SET else "no" s[5:] in SET s[5:] s 5: 5 SET "yes" "no" SET = set() set() SET readline = sys.stdin.readline sys.stdin.readline readline
import sys
readline = sys.stdin.readline
SET = set()
input()
for s in sys.stdin:
    if s[0] == "i":
        SET.add(s[7:])
    elif s[0] == "f":
        print("yes" if s[5:] in SET else "no")

