$d = {}
def insert(str)
  $d[str] = str
end

def find(str)
  if $d[str]
    puts "yes"
  else
    puts "no"
  end
end

n = gets.chomp.to_i
commands=[]
n.times do
  commands.push(gets.chomp)
end
commands.each do |cmd|
  opn, opd = cmd.split(" ")
  send(opn, opd)
end

