def selection_sort(array)
  count = 0
  0.upto(array.size-1) do |i1|
    i_min = i1
    (i1+1).upto(array.size-1) do |i2|
      if (array[i2] < array[i_min]) then
        i_min = i2
      end
    end

    if (i_min != i1) then
      array[i_min], array[i1] = array[i1], array[i_min]
      count += 1
    end
  end
  return count
end

n = gets.chomp.to_i
array = []

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