from sys import stdin

def main():
    a = set()
    _ = int(stdin.readline())
    for command,value in (line.split() for line in stdin.readlines()):
        if command == "insert":
            a.add(value)
        else:
            print("yes" if value in a else "no")

main() from sys import stdin def main():
    a = set()
    _ = int(stdin.readline())
    for command,value in (line.split() for line in stdin.readlines()):
        if command == "insert":
            a.add(value)
        else:
            print("yes" if value in a else "no") main a = set() a set() set _ = int(stdin.readline()) _ int(stdin.readline()) int stdin.readline() stdin.readline stdin readline for command,value in (line.split() for line in stdin.readlines()):
        if command == "insert":
            a.add(value)
        else:
            print("yes" if value in a else "no") command value (line.split() for line in stdin.readlines()) if command == "insert":
            a.add(value)
        else:
            print("yes" if value in a else "no") command == "insert" command "insert" a.add(value) a.add a add value print("yes" if value in a else "no") print "yes" if value in a else "no" value in a value a "yes" "no" main() main def main():
    a = set()
    _ = int(stdin.readline())
    for command,value in (line.split() for line in stdin.readlines()):
        if command == "insert":
            a.add(value)
        else:
            print("yes" if value in a else "no") def main():
    a = set()
    _ = int(stdin.readline())
    for command,value in (line.split() for line in stdin.readlines()):
        if command == "insert":
            a.add(value)
        else:
            print("yes" if value in a else "no") main
from sys import stdin

def main():
    a = set()
    _ = int(stdin.readline())
    for command,value in (line.split() for line in stdin.readlines()):
        if command == "insert":
            a.add(value)
        else:
            print("yes" if value in a else "no")

main()
