n = gets.to_i
commands = []
n.times {commands << gets.chomp.split}

dict = []
commands.each do |c, str|
  n = dict.size
  case c
  when "insert"
    if dict.empty?
      dict << str
    else
      i = 0
      while i < n and dict[i] < str
        i += 1
      end
      dict = dict[0, i] + [str] + dict[i..-1]
    end
  when "find"
    i = 0
    st = loop do
      if dict[i] == str
        break "yes"
      elsif i == n or dict[i] > str
        break "no"
      else
        i += 1
      end
    end
    puts st
  end
end
