import Control.Applicative import Data.List import Data.Char getInt :: IO Integer getInt = (\a -> read a :: Integer) <$> getLine getIntArray :: IO [Integer] getIntArray = ((map (\a -> read a :: Integer)) . words) <$> getLine getStrArray :: Integer -> IO [String] getStrArray 0 = return [] :: IO [String] getStrArray n = (:) <$> getLine <*> (getStrArray (n - 1)) check :: String -> Bool check "" = False check [_] = False check [_, _] = False check [_, _, _] = False check ('L':'O':'V':'E':_) = True check (_:rst) = check rst main = do [n , _] <- getIntArray a <- getStrArray n putStrLn $ if any (\b -> check b) a then "YES" else "NO"