n = gets.to_i
box = []

for i in 0...n
  order, con = gets.split(" ")
case order
when "insert"
  box << con
when "find"
  if box.include?(con) == true
    puts "yes"
  else
    puts "no"
  end
end
end