class Dictionary
  def initialize
    @data = []
  end

  def insert(x)
    @data << x
  end

  def find?(x)
    @data.include?(x)
  end
end

dict = Dictionary.new
n = gets.to_i
1.upto(n).each {
  op, x = gets.chomp.split
  case op
    when "insert" then dict.insert(x)
    when "find" then puts dict.find?(x) ? "yes" : "no"
  end
}