import Control.Applicative
import Control.Monad
import Control.Monad.State
type Dict a = [a]

main = do
  n <- readLn
  let dict = []
  exec n dict


exec n d = evalStateT ( replicateM_ n $ do
                      [a,b] <- liftIO $ words<$>getLine
                      let command = toComm a b
                      command) d
toComm "insert" x = insert x
toComm "find" x   = find x

insert :: Ord a => a -> StateT (Dict a) IO ()
insert x = modify (x:)

find :: Ord a => a -> StateT (Dict a) IO ()
find x = do
  ds <- get
  let res = head'.dropWhile (/= x) $ ds
  if res == Nothing then liftIO $ putStrLn "no"
                    else liftIO $ putStrLn "yes"
  where head' x = if null x then Nothing else Just (head x)