class Dic
  def initialize
    @words = [" "]
  end
  
  def insert(str)
    @words << str
    @words.sort!
  end
  
  def find(str)
    if include?(@words, str)
      puts 'yes'
    else
      puts 'no'
    end
  end
  
  def include?(arr, n)
    if arr.length == 1
      return arr[0] == n
    else
      if arr[arr.length / 2] <= n
        return include?(arr[arr.length / 2..arr.length - 1], n)
      else
        return include?(arr[0...arr.length / 2], n)
      end
    end
  end
end
dic = Dic.new
gets.to_i.times do
  dic.send(*gets.split(" "))
end