n = gets.chomp.to_i
array = []

(n).times do |i|
  line = gets.chomp.split
  if (line[0] == 'insert') then
    array << line[1]
    array.sort!
  elsif (line[0] == 'find') then
    element = array.bsearch{|x| x >= line[1]}
    puts (element == line[1] ? 'yes' : 'no')
  end
end