dict = []
n = gets.to_i
(0...n).each { |n|
  op, v = gets.split(' ')
  if op == "insert"
    dict << v
  elsif op == "find"
    ary = dict & [v]
    if ary.size == 0
      puts "no"
    else
      puts "yes"
    end
  end
}