require 'set'

dic = Set.new
class << dic
  def insert str
    self << str
  end

  def find str
    if self.include? str
      puts 'yes'
    else
      puts 'no'
    end
  end
end

n = gets.to_i
n.times do
  op, str = gets.chomp.split
  dic.send(op, str)
end

