require "set"

n = gets(chomp:true).to_i
array = Set[]

n.times do
  cmd, str = gets.split
  if cmd == "find" 
    array.include?(str.to_sym) ? puts("yes") : puts("no")
  else
    array << str.to_sym
  end
end
